code: def test_rigid_real_bundles():
      bundle_initial = fornix_streamlines()[:20]
      bundle, shift = center_streamlines(bundle_initial)
  
      mat = compose_matrix44([0, 0, 20, 45.0, 0, 0])
  
      bundle2 = transform_streamlines(bundle, mat)
  
      bundle_sum_distance = BundleSumDistanceMatrixMetric()
      srr = StreamlineLinearRegistration(
          bundle_sum_distance, x0=np.zeros(6), method="Powell"
      )
      new_bundle2 = srr.optimize(bundle, bundle2).transform(bundle2)
  
      evaluate_convergence(bundle, new_bundle2)
  
      bundle_min_distance = BundleMinDistanceMatrixMetric()
      srr = StreamlineLinearRegistration(
          bundle_min_distance, x0=np.zeros(6), method="Powell"
      )
      new_bundle2 = srr.optimize(bundle, bundle2).transform(bundle2)
  
      evaluate_convergence(bundle, new_bundle2)
  
      assert_raises(
          ValueError, StreamlineLinearRegistration, method="Whatever"
      )
  
imports: import numpy
  from numpy.testing import assert_, assert_equal, assert_almost_equal, assert_array_almost_equal, assert_raises
  from dipy.align.streamlinear import compose_matrix44, decompose_matrix44, BundleSumDistanceMatrixMetric, BundleMinDistanceMatrixMetric, BundleMinDistanceMetric, StreamlineLinearRegistration, StreamlineDistanceMetric, groupwise_slr, get_unique_pairs
  from dipy.tracking.streamline import center_streamlines, unlist_streamlines, relist_streamlines, transform_streamlines, set_number_of_points, Streamlines
  from dipy.io.streamline import load_tractogram
  from dipy.core.geometry import compose_matrix
  from dipy.data import get_fnames, two_cingulum_bundles, read_five_af_bundles
  from dipy.align.bundlemin import _bundle_minimum_distance_matrix, _bundle_minimum_distance, distance_matrix_mdf
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 5 for calling a global function with example usage: test_rigid_real_bundles() without return types