code: def test_bundle_shape_analysis_flow(rng):
      with TemporaryDirectory() as dirpath:
          data_path = get_fnames("fornix")
          fornix = load_tractogram(
              data_path, "same", bbox_valid_check=False
          ).streamlines
  
          f = Streamlines(fornix)
  
          mb = os.path.join(dirpath, "model_bundles")
          sub = os.path.join(dirpath, "subjects")
  
          os.mkdir(mb)
          sft = StatefulTractogram(f, data_path, Space.RASMM)
          save_tractogram(
              sft, os.path.join(mb, "temp.trk"), bbox_valid_check=False
          )
  
          os.mkdir(sub)
  
          os.mkdir(os.path.join(sub, "patient"))
  
          os.mkdir(os.path.join(sub, "control"))
  
          p = os.path.join(sub, "patient", "10001")
          os.mkdir(p)
  
          c = os.path.join(sub, "control", "20002")
          os.mkdir(c)
  
          for pre in [p, c]:
              os.mkdir(os.path.join(pre, "rec_bundles"))
  
              sft = StatefulTractogram(f, data_path, Space.RASMM)
              save_tractogram(
                  sft,
                  os.path.join(pre, "rec_bundles", "temp.trk"),
                  bbox_valid_check=False,
              )
              os.mkdir(os.path.join(pre, "org_bundles"))
  
              sft = StatefulTractogram(f, data_path, Space.RASMM)
              save_tractogram(
                  sft,
                  os.path.join(pre, "org_bundles", "temp.trk"),
                  bbox_valid_check=False,
              )
              os.mkdir(os.path.join(pre, "anatomical_measures"))
  
              fa = rng.random((255, 255, 255))
  
              save_nifti(
                  os.path.join(pre, "anatomical_measures", "fa.nii.gz"),
                  fa,
                  affine=np.eye(4),
              )
  
          out_dir = os.path.join(dirpath, "output")
          os.mkdir(out_dir)
  
          sm_flow = BundleShapeAnalysis()
  
          sm_flow.run(sub, out_dir=out_dir)
  
          assert_true(os.path.exists(os.path.join(out_dir, "temp.npy")))
  
imports: import os
  from os.path import join
  from tempfile import TemporaryDirectory
  import numpy
  import numpy.testing
  import pytest
  from dipy.data import get_fnames
  from dipy.io.image import save_nifti, load_nifti
  from dipy.io.stateful_tractogram import Space, StatefulTractogram
  from dipy.io.streamline import load_tractogram, save_tractogram
  from dipy.testing import assert_true
  from dipy.testing.decorators import set_random_number_generator
  from dipy.tracking.streamline import Streamlines
  from dipy.utils.optpkg import optional_package
  from dipy.workflows.stats import SNRinCCFlow
  from dipy.workflows.stats import BundleAnalysisTractometryFlow
  from dipy.workflows.stats import LinearMixedModelsFlow
  from dipy.workflows.stats import BundleShapeAnalysis
  from dipy.workflows.stats import buan_bundle_profiles
label_desc: Use image node_id 5 for calling a global function with example usage: test_bundle_shape_analysis_flow(rng) without return types