code: def mean_manhattan_distance(a, b):
      """Compute the average Manhattan-L1 distance (MDF without flip)
  
      Arrays are representing a single streamline or a list of streamlines
      that have the same number of N-dimensional points (two last axis).
  
      Parameters
      ----------
      a : 2D or 3D array
          A streamline or concatenated streamlines
          (array of S streamlines by P points in N dimension).
      b : 2D or 3D array
          A streamline or concatenated streamlines
          (array of S streamlines by P points in N dimension).
  
      Returns
      -------
      1D array
          Distance between each S streamlines
      """
      return np.mean(np.sum(np.abs(a - b), axis=-1), axis=-1)
  
imports: import numpy
  from dipy.segment.metricspeed import SumPointwiseEuclideanMetric, MinimumAverageDirectFlipMetric, AveragePointwiseEuclideanMetric, CosineMetric, Metric, dist
label_desc: Use image node_id 2 for calling a global function with example usage: mean_manhattan_distance(a, b) and returns: np