Surface distance between vertex coordinates on fsaverage

I found a function to calculate the geodesic distance between two points. In the example file

import nibabel as nib
import numpy as np
import matplotlib.pyplot as plt
import os
import surfdist as sd
from surfdist import viz, load, utils, analysis

# calculate and display distance from central sulcus at each node:
cmap = 'coolwarm'
base_dir = '/Applications/freesurfer/subjects/'
surf = nib.freesurfer.read_geometry(os.path.join(base_dir, 'bert/surf/lh.pial'))
cort = np.sort(nib.freesurfer.read_label(os.path.join(base_dir, 'bert/label/lh.cortex.label')))
sulc = nib.freesurfer.read_morph_data(os.path.join(base_dir, 'bert/surf/lh.sulc'))

# load central sulcus nodes
src  = sd.load.load_freesurfer_label(os.path.join(base_dir, 'bert/label/lh.aparc.a2009s.annot'), 'S_central', cort)

# calculate distance
dist = sd.analysis.dist_calc(surf, cort, src)

In my case I have the closest vertex coordinate example vertex location 150370 to vertex location 50022

I am wondering if there is a way to adapt the function to use the vertex points.

Using the MNI coordinates is giving just the euclidean distances so thinking of using the above method