class_docstr: This node replaces a function with fused arguments. It deep-copies the
  function for every permutation of fused types, and allocates a new local
  scope for it. It keeps track of the original function in self.node, and
  the entry of the original function in the symbol table is given the
  'fused_cfunction' attribute which points back to us.
  Then when a function lookup occurs (to e.g. call it), the call can be
  dispatched to the right function.
  
  node    FuncDefNode    the original function
  nodes   [FuncDefNode]  list of copies of node with different specific types
  py_func DefNode        the fused python function subscriptable from
                         Python space
  __signatures__         A DictNode mapping signature specialization strings
                         to PyCFunction nodes
  resulting_fused_function  PyCFunction for the fused DefNode that delegates
                            to specializations
  fused_func_assignment   Assignment of the fused function to the function name
  defaults_tuple          TupleNode of defaults (letting PyCFunctionNode build
                          defaults would result in many different tuples)
  specialized_pycfuncs    List of synthesized pycfunction nodes for the
                          specializations
  code_object             CodeObjectNode shared by all specializations and the
                          fused function
  
  fused_compound_types    All fused (compound) types (e.g. floating[:])
class_docstr_tok: ["This","node","replaces","a","function","with","fused","arguments",".","It","deep-copies","the","function","for","every","permutation","of","fused","types",",","and","allocates","a","new","local","scope","for","it",".","It","keeps","track","of","the","original","function","in","self.node",",","and","the","entry","of","the","original","function","in","the","symbol","table","is","given","the","'fused_cfunction","'","attribute","which","points","back","to","us",".","Then","when","a","function","lookup","occurs","(","to","e.g",".","call","it",")",",","the","call","can","be","dispatched","to","the","right","function",".","node","FuncDefNode","the","original","function","nodes","[","FuncDefNode","]","list","of","copies","of","node","with","different","specific","types","py_func","DefNode","the","fused","python","function","subscriptable","from","Python","space","__signatures__","A","DictNode","mapping","signature","specialization","strings","to","PyCFunction","nodes","resulting_fused_function","PyCFunction","for","the","fused","DefNode","that","delegates","to","specializations","fused_func_assignment","Assignment","of","the","fused","function","to","the","function","name","defaults_tuple","TupleNode","of","defaults","(","letting","PyCFunctionNode","build","defaults","would","result","in","many","different","tuples",")","specialized_pycfuncs","List","of","synthesized","pycfunction","nodes","for","the","specializations","code_object","CodeObjectNode","shared","by","all","specializations","and","the","fused","function","fused_compound_types","All","fused","(","compound",")","types","(","e.g",".","floating","[",":","]",")"]
docstr: Create a copy of the original def or lambda function for specialized
  versions.
docstr_tok: ["Create","a","copy","of","the","original","def","or","lambda","function","for","specialized","versions","."]
code: def copy_def(self, env):
      """
      Create a copy of the original def or lambda function for specialized
      versions.
      """
      fused_compound_types = PyrexTypes.unique(
          [arg.type for arg in self.node.args if arg.type.is_fused]
      )
      fused_types = self._get_fused_base_types(fused_compound_types)
      permutations = PyrexTypes.get_all_specialized_permutations(
          fused_types
      )
  
      self.fused_compound_types = fused_compound_types
  
      if self.node.entry in env.pyfunc_entries:
          env.pyfunc_entries.remove(self.node.entry)
  
      for cname, fused_to_specific in permutations:
          copied_node = copy.deepcopy(self.node)
          # keep signature object identity for special casing in DefNode.analyse_declarations()
          copied_node.entry.signature = self.node.entry.signature
  
          self._specialize_function_args(
              copied_node.args, fused_to_specific
          )
          copied_node.return_type = self.node.return_type.specialize(
              fused_to_specific
          )
  
          copied_node.analyse_declarations(env)
          # copied_node.is_staticmethod = self.node.is_staticmethod
          # copied_node.is_classmethod = self.node.is_classmethod
          self.create_new_local_scope(
              copied_node, env, fused_to_specific
          )
          self.specialize_copied_def(
              copied_node,
              cname,
              self.node.entry,
              fused_to_specific,
              fused_compound_types,
          )
  
          PyrexTypes.specialize_entry(copied_node.entry, cname)
          copied_node.entry.used = True
          env.entries[copied_node.entry.name] = copied_node.entry
  
          if not self.replace_fused_typechecks(copied_node):
              break
  
      self.orig_py_func = self.node
      self.py_func = self.make_fused_cpdef(self.node, env, is_def=True)
  
imports: from __future__ import absolute_import
  import copy
  from .None import ExprNodes, PyrexTypes, MemoryView, ParseTreeTransforms, StringEncoding, Errors
  from .ExprNodes import CloneNode, ProxyNode, TupleNode
  from .Nodes import FuncDefNode, CFuncDefNode, StatListNode, DefNode
  from ..Utils import OrderedSet
label_desc: Use image node_id 2 for calling the FusedCFuncDefNode obj's underlying member method code with example usage: obj.copy_def(env) without return types