parameters: (cls_or_self, **kwargs)
return_statement: return r
docstring: r"""Wrapper that allows creation of class factories.
  
      This can be useful when there is a need to create classes with the same
      constructor arguments, but different instances. Can be used in conjunction with
      _callable_args
  
      Example::
  
          >>> Foo.with_args = classmethod(_with_args)
          >>> foo_builder = Foo.with_args(a=3, b=4).with_args(answer=42)
          >>> foo_instance1 = foo_builder()
          >>> foo_instance2 = foo_builder()
          >>> id(foo_instance1) == id(foo_instance2)
          False
docstring_summary: r"""Wrapper that allows creation of class factories.
docstring_tokens: r Wrapper that allows creation of class factories .
function: def _with_args(cls_or_self, **kwargs):
      r"""Wrapper that allows creation of class factories.
  
      This can be useful when there is a need to create classes with the same
      constructor arguments, but different instances. Can be used in conjunction with
      _callable_args
  
      Example::
  
          >>> Foo.with_args = classmethod(_with_args)
          >>> foo_builder = Foo.with_args(a=3, b=4).with_args(answer=42)
          >>> foo_instance1 = foo_builder()
          >>> foo_instance2 = foo_builder()
          >>> id(foo_instance1) == id(foo_instance2)
          False
      """
      r = _PartialWrapper(partial(cls_or_self, **kwargs))
      return r
function_tokens: def _with_args ( cls_or_self , * * kwargs ) : r = _PartialWrapper ( partial ( cls_or_self , * * kwargs ) ) return r