code: def _wrap_bitmap_bits_in_array(bitmap, shape, dtype):
      """Return an ndarray view on the data in a FreeImage bitmap. Only
      valid for as long as the bitmap is loaded (if single page) / locked
      in memory (if multipage).
  
      """
      pitch = _FI.FreeImage_GetPitch(bitmap)
      itemsize = dtype.itemsize
  
      if len(shape) == 3:
          strides = (itemsize, shape[0] * itemsize, pitch)
      else:
          strides = (itemsize, pitch)
      bits = _FI.FreeImage_GetBits(bitmap)
  
      class DummyArray(object):
          __array_interface__ = {
              "data": (bits, False),
              "strides": strides,
              "typestr": dtype.str,
              "shape": tuple(shape),
              "version": 3,
          }
  
      return np.array(DummyArray(), copy=False)
  
imports: import sys
  import os
  import ctypes
  import ctypes.util
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: _wrap_bitmap_bits_in_array(bitmap, shape, dtype) and returns: np