code: def _get_img_fdata(img):
      data = np.asanyarray(img.dataobj)
      dtype = np.complex128 if np.iscomplexobj(data) else np.float64
      return data.astype(dtype)
  
imports: import inspect
  import operator
  import os
  import warnings
  from contextlib import contextmanager
  from io import StringIO
  from math import log
  from pprint import pprint
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: _get_img_fdata(img) and returns: data