code: def rec_append_fields(base, names, data, dtypes=None):
      """
      Add new fields to an existing array.
  
      The names of the fields are given with the `names` arguments,
      the corresponding values with the `data` arguments.
      If a single field is appended, `names`, `data` and `dtypes` do not have
      to be lists but just values.
  
      Parameters
      ----------
      base : array
          Input array to extend.
      names : string, sequence
          String or sequence of strings corresponding to the names
          of the new fields.
      data : array or sequence of arrays
          Array or sequence of arrays storing the fields to add to the base.
      dtypes : sequence of datatypes, optional
          Datatype or sequence of datatypes.
          If None, the datatypes are estimated from the `data`.
  
      See Also
      --------
      append_fields
  
      Returns
      -------
      appended_array : np.recarray
      """
      return append_fields(
          base,
          names,
          data=data,
          dtypes=dtypes,
          asrecarray=True,
          usemask=False,
      )
  
imports: 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
label_desc: Use image node_id 27 for calling a global function with example usage: rec_append_fields(base, names, data, dtypes) and returns: append_fields