class_docstr: A decorator class for recursive nested functions.
  Naive recursive nested functions hold a reference to themselves:
  
  def outer(*args):
      def stringify_leaky(arg0, *arg1):
          if len(arg1) > 0:
              return stringify_leaky(*arg1)  # <- HERE
          return str(arg0)
      stringify_leaky(*args)
  
  This design pattern creates a reference cycle that is difficult for a
  garbage collector to resolve. The decorator class prevents the
  cycle by passing the nested function in as an argument `self`:
  
  def outer(*args):
      @recursive
      def stringify(self, arg0, *arg1):
          if len(arg1) > 0:
              return self(*arg1)
          return str(arg0)
      stringify(*args)
class_docstr_tok: ["A","decorator","class","for","recursive","nested","functions",".","Naive","recursive","nested","functions","hold","a","reference","to","themselves",":","def","outer","(","*","args",")",":","def","stringify_leaky","(","arg0",",","*","arg1",")",":","if","len","(","arg1",")",">","0",":","return","stringify_leaky","(","*","arg1",")","#","<","-","HERE","return","str","(","arg0",")","stringify_leaky","(","*","args",")","This","design","pattern","creates","a","reference","cycle","that","is","difficult","for","a","garbage","collector","to","resolve",".","The","decorator","class","prevents","the","cycle","by","passing","the","nested","function","in","as","an","argument","`","self","`",":","def","outer","(","*","args",")",":","@","recursive","def","stringify","(","self",",","arg0",",","*","arg1",")",":","if","len","(","arg1",")",">","0",":","return","self","(","*","arg1",")","return","str","(","arg0",")","stringify","(","*","args",")"]
code: def __call__(self, *args, **kwargs):
      return self.func(self, *args, **kwargs)
  
imports: from __future__ import division, absolute_import, print_function
  import re
  import sys
  import platform
  from numpy.compat import unicode
  from numpy.core.overrides import set_module
  from .multiarray import dtype, array, ndarray
label_desc: Use image node_id 2 for calling the recursive obj's underlying member method code with example usage: obj.__call__() and returns: self