Extracting brain regions for a set of ECoG electrode 3D coordinates

I just want to extract the brain regions for each ECoG electrode using data of the 3D coordinates. Somehow, the following code produces an error. This is my first time to use mne. It seems that I got some attributes wrong. Please help, thanks!

!pip install mne
import mne

Load the 3D electrode coordinates

electrode_coordinates = dataset[‘loc’]

Load the brain atlas

brain_atlas = mne.read_annot(“fsaverage_2009.aparc.annot”)

Extract the brain regions under the electrodes

brain_regions = brain_atlas.get_regions_under_points(electrode_coordinates)

Print the brain regions

for brain_region in brain_regions:
print(brain_region)