code: def _checknames(descr, names=None):
      """
      Checks that field names ``descr`` are not reserved keywords.
  
      If this is the case, a default 'f%i' is substituted.  If the argument
      `names` is not None, updates the field names to valid names.
  
      """
      ndescr = len(descr)
      default_names = ["f%i" % i for i in range(ndescr)]
      if names is None:
          new_names = default_names
      else:
          if isinstance(names, (tuple, list)):
              new_names = names
          elif isinstance(names, str):
              new_names = names.split(",")
          else:
              raise NameError("illegal input names %s" % repr(names))
          nnames = len(new_names)
          if nnames < ndescr:
              new_names += default_names[nnames:]
      ndescr = []
      for n, d, t in zip(new_names, default_names, descr.descr):
          if n in reserved_fields:
              if t[0] in reserved_fields:
                  ndescr.append((d, t[1]))
              else:
                  ndescr.append(t)
          else:
              ndescr.append((n, t[1]))
      return np.dtype(ndescr)
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import warnings
  import numpy
  import numpy.core.numerictypes
  from numpy.compat import basestring
  from numpy import bool_, dtype, ndarray, recarray, array
  from numpy.core.records import fromarrays, fromrecords
  import numpy.ma
  from numpy.ma import MAError, MaskedArray, masked, nomask, masked_array, getdata, getmaskarray, filled
label_desc: Use image node_id 1 for calling a global function with example usage: _checknames(descr, names) and returns: np