code: def _keep_fields(base, keep_names, usemask=True, asrecarray=False):
      """
      Return a new array keeping only the fields in `keep_names`,
      and preserving the order of those fields.
  
      Parameters
      ----------
      base : array
          Input array
      keep_names : string or sequence
          String or sequence of strings corresponding to the names of the
          fields to keep. Order of the names will be preserved.
      usemask : {False, True}, optional
          Whether to return a masked array or not.
      asrecarray : string or sequence, optional
          Whether to return a recarray or a mrecarray (`asrecarray=True`) or
          a plain ndarray or masked array with flexible dtype. The default
          is False.
      """
      newdtype = [(n, base.dtype[n]) for n in keep_names]
      output = np.empty(base.shape, dtype=newdtype)
      output = recursive_fill_fields(base, output)
      return _fix_output(output, usemask=usemask, asrecarray=asrecarray)
  
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 19 for calling a global function with example usage: _keep_fields(base, keep_names, usemask, asrecarray) and returns: _fix_output