code: def round_trip(arr, out_dtype):
      img = Nifti1Image(arr, np.eye(4), dtype=out_dtype)
      img.file_map["image"].fileobj = BytesIO()
      img.to_file_map()
      back = Nifti1Image.from_file_map(img.file_map)
      # Recover array and calculated scaling from array proxy object
      return back.get_fdata(), back.dataobj.slope, back.dataobj.inter
  
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 1 for calling a global function with example usage: round_trip(arr, out_dtype) and returns: back,  back,  back