parameters: (cls, *args, **kwargs)
return_statement: return type.__call__(cls, *args, **kwargs)
docstring: Construct a new `Form` instance, creating `_unbound_fields` on the
          class if it is empty.
docstring_summary: Construct a new `Form` instance, creating `_unbound_fields` on the
          class if it is empty.
docstring_tokens: Construct a new Form instance creating _unbound_fields on the class if it is empty .
function: def __call__(cls, *args, **kwargs):
          """
          Construct a new `Form` instance, creating `_unbound_fields` on the
          class if it is empty.
          """
          if cls._unbound_fields is None:
              fields = []
              for name in dir(cls):
                  if not name.startswith('_'):
                      unbound_field = getattr(cls, name)
                      if hasattr(unbound_field, '_formfield'):
                          fields.append((name, unbound_field))
              # We keep the name as the second element of the sort
              # to ensure a stable sort.
              fields.sort(key=lambda x: (x[1].creation_counter, x[0]))
              cls._unbound_fields = fields
          return type.__call__(cls, *args, **kwargs)
function_tokens: def __call__ ( cls , * args , * * kwargs ) : if cls . _unbound_fields is None : fields = [ ] for name in dir ( cls ) : if not name . startswith ( '_' ) : unbound_field = getattr ( cls , name ) if hasattr ( unbound_field , '_formfield' ) : fields . append ( ( name , unbound_field ) ) # We keep the name as the second element of the sort # to ensure a stable sort. fields . sort ( key = lambda x : ( x [ 1 ] . creation_counter , x [ 0 ] ) ) cls . _unbound_fields = fields return type . __call__ ( cls , * args , * * kwargs )