parameters: (superclass, func=None)
return_statement: return contribute_to_class
docstring: Returns a suitable contribute_to_class() method for the Field subclass.
      If 'func' is passed in, it is the existing contribute_to_class() method on
      the subclass and it is called before anything else. It is assumed in this
      case that the existing contribute_to_class() calls all the necessary
      superclass methods.
docstring_summary: Returns a suitable contribute_to_class() method for the Field subclass.
      If 'func' is passed in, it is the existing contribute_to_class() method on
      the subclass and it is called before anything else. It is assumed in this
      case that the existing contribute_to_class() calls all the necessary
      superclass methods.
docstring_tokens: Returns a suitable contribute_to_class () method for the Field subclass . If func is passed in it is the existing contribute_to_class () method on the subclass and it is called before anything else . It is assumed in this case that the existing contribute_to_class () calls all the necessary superclass methods .
function: def make_contrib(superclass, func=None):
      """
      Returns a suitable contribute_to_class() method for the Field subclass.
      If 'func' is passed in, it is the existing contribute_to_class() method on
      the subclass and it is called before anything else. It is assumed in this
      case that the existing contribute_to_class() calls all the necessary
      superclass methods.
      """
      def contribute_to_class(self, cls, name, **kwargs):
          if func:
              func(self, cls, name, **kwargs)
          else:
              super(superclass, self).contribute_to_class(cls, name, **kwargs)
          setattr(cls, self.name, Creator(self))
  
      return contribute_to_class
function_tokens: def make_contrib ( superclass , func = None ) : def contribute_to_class ( self , cls , name , * * kwargs ) : if func : func ( self , cls , name , * * kwargs ) else : super ( superclass , self ) . contribute_to_class ( cls , name , * * kwargs ) setattr ( cls , self . name , Creator ( self ) ) return contribute_to_class