code: def from_file_map(klass, file_map, mmap=True, keep_file_open=None):
      if mmap not in (True, False, "c", "r"):
          raise ValueError(
              "mmap should be one of {True, False, 'c', 'r'}"
          )
      if mmap is True:
          mmap = "c"
      elif mmap is False:
          mmap = None
      with file_map["image"].get_prepare_fileobj("rb") as fobj:
          try:
              arr = np.load(fobj, mmap=mmap)
          except:
              arr = np.load(fobj)
      return klass(arr)
  
file_path: nibabel/nibabel/tests/test_dataobj_images.py
imports: import numpy
  from nibabel.dataobj_images import DataobjImage
  from nibabel.filebasedimages import FileBasedHeader
  from nibabel.tests.test_filebasedimages import TestFBImageAPI
  from nibabel.tests.test_image_api import DataInterfaceMixin
label_desc: Use image node_id 1 for calling the DoNumpyImage obj's underlying member method code with example usage: obj.from_file_map(klass, file_map, mmap, keep_file_open) and returns: klass