code: def test_round_trip():
      scaling_type = np.float32
      rng = np.random.RandomState(20111121)
      N = 10000
      sd_10s = range(-20, 51, 5)
      iuint_types = sctypes["int"] + sctypes["uint"]
      # Remove types which cannot be set into nifti header datatype
      nifti_supported = supported_np_types(Nifti1Header())
      iuint_types = [t for t in iuint_types if t in nifti_supported]
      f_types = [np.float32, np.float64]
      # Expanding standard deviations
      for i, sd_10 in enumerate(sd_10s):
          sd = 10.0**sd_10
          V_in = rng.normal(0, sd, size=(N, 1))
          for j, in_type in enumerate(f_types):
              for k, out_type in enumerate(iuint_types):
                  check_arr(
                      sd_10, V_in, in_type, out_type, scaling_type
                  )
      # Spread integers across range
      for i, sd in enumerate(np.linspace(0.05, 0.5, 5)):
          for j, in_type in enumerate(iuint_types):
              info = np.iinfo(in_type)
              mn, mx = info.min, info.max
              type_range = mx - mn
              center = type_range / 2.0 + mn
              # float(sd) because type_range can be type 'long'
              width = type_range * float(sd)
              V_in = rng.normal(center, width, size=(N, 1))
              for k, out_type in enumerate(iuint_types):
                  check_arr(sd, V_in, in_type, out_type, scaling_type)
  
file_path: nibabel/nibabel/tests/test_round_trip.py
imports: from io import BytesIO
  import numpy
  from numpy.testing import assert_array_equal
  from ..None import Nifti1Header, Nifti1Image
  from ..arraywriters import ScalingError
  from ..casting import best_float, sctypes, type_info, ulp
  from ..spatialimages import HeaderDataError, supported_np_types
label_desc: Use image node_id 5 for calling a global function with example usage: test_round_trip() without return types