code: def fromrecords(
      recList,
      dtype=None,
      shape=None,
      formats=None,
      names=None,
      titles=None,
      aligned=False,
      byteorder=None,
  ):
      """Create a recarray from a list of records in text form.
  
      Parameters
      ----------
      recList : sequence
          data in the same field may be heterogeneous - they will be promoted
          to the highest data type.
      dtype : data-type, optional
          valid dtype for all arrays
      shape : int or tuple of ints, optional
          shape of each array.
      formats, names, titles, aligned, byteorder :
          If `dtype` is ``None``, these arguments are passed to
          `numpy.format_parser` to construct a dtype. See that function for
          detailed documentation.
  
          If both `formats` and `dtype` are None, then this will auto-detect
          formats. Use list of tuples rather than list of lists for faster
          processing.
  
      Returns
      -------
      np.recarray
          record array consisting of given recList rows.
  
      Examples
      --------
      >>> r=np._core.records.fromrecords([(456,'dbe',1.2),(2,'de',1.3)],
      ... names='col1,col2,col3')
      >>> print(r[0])
      (456, 'dbe', 1.2)
      >>> r.col1
      array([456,   2])
      >>> r.col2
      array(['dbe', 'de'], dtype='<U3')
      >>> import pickle
      >>> pickle.loads(pickle.dumps(r))
      rec.array([(456, 'dbe', 1.2), (  2, 'de', 1.3)],
                dtype=[('col1', '<i8'), ('col2', '<U3'), ('col3', '<f8')])
      """
  
      if formats is None and dtype is None:  # slower
          obj = sb.array(recList, dtype=object)
          arrlist = [
              sb.array(obj[..., i].tolist())
              for i in range(obj.shape[-1])
          ]
          return fromarrays(
              arrlist,
              formats=formats,
              shape=shape,
              names=names,
              titles=titles,
              aligned=aligned,
              byteorder=byteorder,
          )
  
      if dtype is not None:
          descr = sb.dtype((record, dtype))
      else:
          descr = format_parser(
              formats, names, titles, aligned, byteorder
          ).dtype
  
      try:
          retval = sb.array(recList, dtype=descr)
      except (TypeError, ValueError):
          # NumPy 1.19.0, 2020-01-01
          shape = _deprecate_shape_0_as_None(shape)
          if shape is None:
              shape = len(recList)
          if isinstance(shape, int):
              shape = (shape,)
          if len(shape) > 1:
              raise ValueError("Can only deal with 1-d array.")
          _array = recarray(shape, descr)
          for k in range(_array.size):
              _array[k] = tuple(recList[k])
          # list of lists instead of list of tuples ?
          # 2018-02-07, 1.14.1
          warnings.warn(
              "fromrecords expected a list of tuples, may have received a list "
              "of lists instead. In the future that will raise an error",
              FutureWarning,
              stacklevel=2,
          )
          return _array
      else:
          if shape is not None and retval.shape != shape:
              retval.shape = shape
  
      res = retval.view(recarray)
  
      return res
  
imports: import os
  import warnings
  from collections import Counter
  from contextlib import nullcontext
  from .._utils import set_module
  from .None import numeric
  from .None import numerictypes
  from .arrayprint import _get_legacy_print_mode
label_desc: Use image node_id 4 for calling a global function with example usage: fromrecords(recList, dtype, shape, formats, names, titles, aligned, byteorder) and returns: res, fromarrays, _array