code: def bundle_min_distance(t, static, moving):
      """MDF-based pairwise distance optimization function (MIN).
  
      We minimize the distance between moving streamlines as they align
      with the static streamlines.
  
      Parameters
      ----------
      t : ndarray
          t is a vector of affine transformation parameters with
          size at least 6.
          If size is 6, t is interpreted as translation + rotation.
          If size is 7, t is interpreted as translation + rotation +
          isotropic scaling.
          If size is 12, t is interpreted as translation + rotation +
          scaling + shearing.
  
      static : list
          Static streamlines
  
      moving : list
          Moving streamlines.
  
      Returns
      -------
      cost: float
  
      """
      aff = compose_matrix44(t)
      moving = transform_streamlines(moving, aff)
      d01 = distance_matrix_mdf(static, moving)
  
      rows, cols = d01.shape
      return (
          0.25
          * (
              np.sum(np.min(d01, axis=0)) / float(cols)
              + np.sum(np.min(d01, axis=1)) / float(rows)
          )
          ** 2
      )
  
imports: import logging
  import abc
  from itertools import combinations
  import numpy
  from dipy.core.optimize import Optimizer
  from dipy.align.bundlemin import _bundle_minimum_distance, _bundle_minimum_distance_asymmetric, distance_matrix_mdf
  from dipy.tracking.streamline import transform_streamlines, unlist_streamlines, center_streamlines, set_number_of_points, select_random_set_of_streamlines, length, Streamlines
  from dipy.segment.clustering import qbx_and_merge
  from dipy.core.geometry import compose_transformations, compose_matrix, decompose_matrix
  from time import time
label_desc: Use image node_id 2 for calling a global function with example usage: bundle_min_distance(t, static, moving) and returns: unknown