class_docstr: Ufunc signature, restricted format suitable for special functions.
  
  Parameters
  ----------
  name
      Name of the ufunc to create
  signature
      String of form 'func: fff*ff->f, func2: ddd->*i' describing
      the C-level functions and types of their input arguments
      and return values.
  
      The syntax is
      'function_name: inputparams*outputparams->output_retval*ignored_retval'
  
  Attributes
  ----------
  name : str
      Python name for the Ufunc
  signatures : list of (func_name, inarg_spec, outarg_spec, ret_spec, header_name)
      List of parsed signatures
  doc : str
      Docstring, obtained from add_newdocs
  function_name_overrides : dict of str->str
      Overrides for the function names in signatures
code: def generate(self, all_loops):
      toplevel = ""
  
      variants, inarg_num, outarg_num = self._get_signatures_and_loops(
          all_loops
      )
  
      loops = []
      funcs = []
      types = []
  
      for func_name, loop_name, inputs, outputs in variants:
          for x in inputs:
              types.append(TYPE_NAMES[x])
          for x in outputs:
              types.append(TYPE_NAMES[x])
          loops.append(loop_name)
          funcs.append(func_name)
  
      toplevel += (
          "cdef np.PyUFuncGenericFunction ufunc_%s_loops[%d]\n"
          % (self.name, len(loops))
      )
      toplevel += "cdef void *ufunc_%s_ptr[%d]\n" % (
          self.name,
          2 * len(funcs),
      )
      toplevel += "cdef void *ufunc_%s_data[%d]\n" % (
          self.name,
          len(funcs),
      )
      toplevel += "cdef char ufunc_%s_types[%d]\n" % (
          self.name,
          len(types),
      )
      toplevel += 'cdef char *ufunc_{}_doc = (\n    "{}")\n'.format(
          self.name,
          self.doc.replace("\\", "\\\\")
          .replace('"', '\\"')
          .replace("\n", '\\n"\n    "'),
      )
  
      for j, function in enumerate(loops):
          toplevel += (
              "ufunc_%s_loops[%d] = <np.PyUFuncGenericFunction>%s\n"
              % (self.name, j, function)
          )
      for j, type in enumerate(types):
          toplevel += "ufunc_%s_types[%d] = <char>%s\n" % (
              self.name,
              j,
              type,
          )
      for j, func in enumerate(funcs):
          toplevel += "ufunc_%s_ptr[2*%d] = <void*>%s\n" % (
              self.name,
              j,
              self.cython_func_name(func, specialized=True),
          )
          toplevel += (
              'ufunc_%s_ptr[2*%d+1] = <void*>(<char*>"%s")\n'
              % (self.name, j, self.name)
          )
      for j, func in enumerate(funcs):
          toplevel += "ufunc_%s_data[%d] = &ufunc_%s_ptr[2*%d]\n" % (
              self.name,
              j,
              self.name,
              j,
          )
  
      toplevel += (
          "@ = np.PyUFunc_FromFuncAndData(ufunc_@_loops, "
          "ufunc_@_data, ufunc_@_types, %d, %d, %d, 0, "
          '"@", ufunc_@_doc, 0)\n'
          % (
              len(types) / (inarg_num + outarg_num),
              inarg_num,
              outarg_num,
          )
      ).replace("@", self.name)
  
      return toplevel
  
imports: import itertools
  import json
  import os
  from stat import ST_MTIME
  import argparse
  import re
  import textwrap
  import numpy
label_desc: Use image node_id 3 for calling the Ufunc obj's underlying member method code with example usage: obj.generate(all_loops) and returns: toplevel