code: def flatten_descr(ndtype):
      """
      Flatten a structured data-type description.
  
      Examples
      --------
      >>> from numpy.lib import recfunctions as rfn
      >>> ndtype = np.dtype([('a', '<i4'), ('b', [('ba', '<f8'), ('bb', '<i4')])])
      >>> rfn.flatten_descr(ndtype)
      (('a', dtype('int32')), ('ba', dtype('float64')), ('bb', dtype('int32')))
  
      """
      names = ndtype.names
      if names is None:
          return (("", ndtype),)
      else:
          descr = []
          for field in names:
              (typ, _) = ndtype.fields[field]
              if typ.names:
                  descr.extend(flatten_descr(typ))
              else:
                  descr.append((field, typ))
          return tuple(descr)
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import itertools
  import numpy
  import numpy.ma
  from numpy import ndarray, recarray
  from numpy.ma import MaskedArray
  from numpy.ma.mrecords import MaskedRecords
  from numpy.core.overrides import array_function_dispatch
  from numpy.lib._iotools import _is_string_like
  from numpy.compat import basestring
  from numpy.testing import suppress_warnings
label_desc: Use image node_id 6 for calling a global function with example usage: flatten_descr(ndtype) and returns: str,  ndtype, tuple