code: def get_declaration(
      ufunc, c_name, c_proto, cy_proto, header, proto_h_filename
  ):
      """
      Construct a Cython declaration of a function coming either from a
      pxd or a header file. Do sufficient tricks to enable compile-time
      type checking against the signature expected by the ufunc.
  
      """
      defs = []
      defs_h = []
  
      var_name = (
          c_name.replace("[", "_").replace("]", "_").replace(" ", "_")
      )
  
      if header.endswith(".pxd"):
          defs.append(
              "from .{} cimport {} as {}".format(
                  header[:-4],
                  ufunc.cython_func_name(c_name, prefix=""),
                  ufunc.cython_func_name(c_name),
              )
          )
  
          # check function signature at compile time
          proto_name = "_proto_%s_t" % var_name
          defs.append(
              "ctypedef %s" % (cy_proto.replace("(*)", proto_name))
          )
          defs.append(
              "cdef {} *{}_var = &{}".format(
                  proto_name,
                  proto_name,
                  ufunc.cython_func_name(c_name, specialized=True),
              )
          )
      else:
          # redeclare the function, so that the assumed
          # signature is checked at compile time
          new_name = f'{ufunc.cython_func_name(c_name)} "{c_name}"'
          proto_h_filename = os.path.basename(proto_h_filename)
          defs.append(f'cdef extern from r"{proto_h_filename}":')
          defs.append(
              "    cdef %s" % (cy_proto.replace("(*)", new_name))
          )
          defs_h.append(f'#include "{header}"')
          defs_h.append("%s;" % (c_proto.replace("(*)", c_name)))
  
      return defs, defs_h, var_name
  
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 10 for calling a global function with example usage: get_declaration(ufunc, c_name, c_proto, cy_proto, header, proto_h_filename) and returns: defs,  defs_h,  var_name