code: def fromstring(
      datastring,
      dtype=None,
      shape=None,
      offset=0,
      formats=None,
      names=None,
      titles=None,
      aligned=False,
      byteorder=None,
  ):
      """create a (read-only) record array from binary data contained in
      a string"""
  
      if dtype is None and formats is None:
          raise TypeError(
              "fromstring() needs a 'dtype' or 'formats' argument"
          )
  
      if dtype is not None:
          descr = sb.dtype(dtype)
      else:
          descr = format_parser(
              formats, names, titles, aligned, byteorder
          )._descr
  
      itemsize = descr.itemsize
      if shape is None or shape == 0 or shape == -1:
          shape = (len(datastring) - offset) // itemsize
  
      _array = recarray(shape, descr, buf=datastring, offset=offset)
      return _array
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import warnings
  from .None import numeric
  from .None import numerictypes
  from numpy.compat import isfileobj, bytes, long, unicode, os_fspath
  from numpy.core.overrides import set_module
  from .arrayprint import get_printoptions
label_desc: Use image node_id 4 for calling a global function with example usage: fromstring(datastring, dtype, shape, offset, formats, names, titles, aligned, byteorder) and returns: _array