code: def test_mgh_load_fileobj():
      # Checks the filename gets passed to array proxy
      #
      # This is a bit of an implementation detail, but the test is to make sure
      # that we aren't passing ImageOpener objects to the array proxy, as these
      # were confusing mmap on Python 3.  If there's some sensible reason not to
      # pass the filename to the array proxy, please feel free to change this
      # test.
      img = MGHImage.load(MGZ_FNAME)
      assert pathlib.Path(img.dataobj.file_like) == pathlib.Path(
          MGZ_FNAME
      )
      # Check fileobj also passed into dataobj
      with ImageOpener(MGZ_FNAME) as fobj:
          contents = fobj.read()
      bio = io.BytesIO(contents)
      fm = MGHImage.make_file_map(mapping=dict(image=bio))
      img2 = MGHImage.from_file_map(fm)
      assert img2.dataobj.file_like is bio
      assert_array_equal(img.get_fdata(), img2.get_fdata())
  
imports: import io
  import os
  import pathlib
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ...None import imageglobals
  from ...fileholders import FileHolder
  from ...openers import ImageOpener
  from ...spatialimages import HeaderDataError
  from ...testing import data_path
  from ...tests import test_spatialimages
  from ...tests import test_wrapstruct
  from ...tmpdirs import InTemporaryDirectory
  from ...volumeutils import sys_is_le
  from ...wrapstruct import WrapStructError
  from ..None import load, save
  from ..mghformat import MGHError, MGHHeader, MGHImage
label_desc: Use image node_id 13 for calling a global function with example usage: test_mgh_load_fileobj() without return types