code: def _flatten_structure(array):
      """Flatten numpy.recarray or structured arrays into a dict."""
      # recarrays/structured arrays do not have guaranteed bit offsets - make a
      # copy of the array to fix
      columns = [numpy.copy(array[col]) for col in array.dtype.names]
      return dict(zip(array.dtype.names, columns))
  
imports: from distutils.util import strtobool
  from math import isnan
  import numpy
  import pandas
  from ..core.data import deconstruct_numpy, deconstruct_pandas, make_null_mask
  from ..core.data.pd import _parse_datetime_index
  from ..core.exception import PerspectiveError
  from ._date_validator import _PerspectiveDateValidator
  from .libpsppy import t_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: _flatten_structure(array) and returns: dict