code: def anatomical_measures(
      bundle, metric, dt, pname, bname, subject, group_id, ind, dir_name
  ):
      """Calculates dti measure (eg: FA, MD) per point on streamlines and
          save it in hd5 file.
  
      Parameters
      ----------
      bundle : string
          Name of bundle being analyzed
      metric : matrix of float values
          dti metric e.g. FA, MD
      dt : DataFrame
          DataFrame to be populated
      pname : string
          Name of the dti metric
      bname : string
          Name of bundle being analyzed.
      subject : string
          subject number as a string (e.g. 10001)
      group_id : integer
          which group subject belongs to 1 for patient and 0 control
      ind : integer list
          ind tells which disk number a point belong.
      dir_name : string
          path of output directory
  
      """
      dt["streamline"] = []
      dt["disk"] = []
      dt["subject"] = []
      dt[pname] = []
      dt["group"] = []
  
      values = map_coordinates(metric, bundle._data.T, order=1)
  
      dt["disk"].extend(ind[list(range(len(values)))] + 1)
      dt["subject"].extend([subject] * len(values))
      dt["group"].extend([group_id] * len(values))
      dt[pname].extend(values)
  
      for st_i in range(len(bundle)):
          st = bundle[st_i]
          dt["streamline"].extend([st_i] * len(st))
  
      file_name = bname + "_" + pname
  
      save_buan_profiles_hdf5(os.path.join(dir_name, file_name), dt)
  
file_path: dipy/dipy/stats/analysis.py
imports: import os
  import numpy
  from scipy.spatial import cKDTree
  from scipy.ndimage import map_coordinates
  from scipy.spatial.distance import mahalanobis
  from dipy.io.utils import save_buan_profiles_hdf5
  from dipy.segment.clustering import QuickBundles
  from dipy.segment.metricspeed import AveragePointwiseEuclideanMetric
  from dipy.tracking.streamline import set_number_of_points, values_from_volume, orient_by_streamline, Streamlines
label_desc: Use image node_id 2 for calling a global function with example usage: anatomical_measures(bundle, metric, dt, pname, bname, subject, group_id, ind, dir_name) without return types