code: def test_bundles_distances_mam():
      xyz1A = np.array(
          [[0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0]], dtype="float32"
      )
      xyz2A = np.array(
          [[0, 1, 1], [1, 0, 1], [2, 3, -2]], dtype="float32"
      )
      xyz1B = np.array(
          [[-1, 0, 0], [2, 0, 0], [2, 3, 0], [3, 0, 0]], dtype="float32"
      )
      tracksA = [xyz1A, xyz2A]
      tracksB = [xyz1B, xyz1A, xyz2A]
  
      for metric in ("avg", "min", "max"):
          pf.bundles_distances_mam(tracksA, tracksB, metric=metric)
  
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always", category=UserWarning)
          tracksC = [xyz2A, xyz1A]
          _ = pf.bundles_distances_mam(tracksA, tracksC)
          print(w)
          assert_true(len(w) == 1)
          assert_true(issubclass(w[0].category, UserWarning))
          assert_true(
              "not have the same number of points" in str(w[0].message)
          )
  
file_path: dipy/dipy/tracking/tests/test_distances.py
imports: import warnings
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_equal, assert_almost_equal, assert_array_equal
  from dipy.testing import assert_true
  from dipy.testing.decorators import set_random_number_generator
  from dipy.tracking import distances
  from dipy.tracking.streamline import set_number_of_points
  from dipy.data import get_fnames
  from dipy.io.streamline import load_tractogram
label_desc: Use image node_id 2 for calling a global function with example usage: test_bundles_distances_mam() without return types