code: def test_difference_with_minmax():
      # Show difference with and without minmax normalization
      # we create an odf here with 3 main peaks, 1 small sharp unwanted peak
      # (noise) and an isotropic compartment.
      mevals = np.array(
          [
              [0.0015, 0.0003, 0.0003],
              [0.0015, 0.0003, 0.0003],
              [0.0015, 0.0003, 0.0003],
              [0.0015, 0.00005, 0.00005],
              [0.0015, 0.0015, 0.0015],
          ]
      )
      angles = [(0, 0), (45, 0), (90, 0), (90, 90), (0, 0)]
      fractions = [20, 20, 10, 1, 100 - 20 - 20 - 10 - 1]
      odf_gt, sticks, sphere = _create_mt_sim(
          mevals, angles, fractions, 100, None
      )
  
      # We will show that when the minmax normalization is used we can remove
      # the noisy peak using a lower threshold.
  
      odf_gt_minmax = (odf_gt - odf_gt.min()) / (
          odf_gt.max() - odf_gt.min()
      )
  
      _, values_1, _ = peak_directions(odf_gt, sphere, 0.30, 25.0)
  
      assert_equal(len(values_1), 3)
  
      _, values_2, _ = peak_directions(
          odf_gt_minmax, sphere, 0.30, 25.0
      )
  
      assert_equal(len(values_2), 3)
  
      # Setting the smallest value of the odf to zero is like running
      # peak_directions without the odf_min correction.
      odf_gt[odf_gt.argmin()] = 0.0
      _, values_3, _ = peak_directions(
          odf_gt,
          sphere,
          0.30,
          25.0,
      )
  
      assert_equal(len(values_3), 4)
  
      # we show here that to actually get that noisy peak out we need to
      # increase the peak threshold considerably
      directions, values_4, indices = peak_directions(
          odf_gt,
          sphere,
          0.60,
          25.0,
      )
  
      assert_equal(len(values_4), 3)
      assert_almost_equal(values_1, values_4)
  
imports: import warnings
  import numpy
  import pickle
  from io import BytesIO
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_almost_equal, assert_equal, assert_
  from dipy.reconst.odf import OdfFit, OdfModel, gfa
  from dipy.direction.peaks import peaks_from_model, peak_directions, peak_directions_nl, reshape_peaks_for_visualization
  from dipy.core.subdivide_octahedron import create_unit_hemisphere
  from dipy.core.sphere import unit_icosahedron
  from dipy.sims.voxel import multi_tensor, multi_tensor_odf
  from dipy.data import get_fnames, get_sphere, default_sphere
  from dipy.core.gradients import gradient_table, GradientTable
  from dipy.core.sphere_stats import angular_similarity
  from dipy.core.sphere import HemiSphere
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.reconst.shm import descoteaux07_legacy_msg, tournier07_legacy_msg
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 6 for calling a global function with example usage: test_difference_with_minmax() without return types