def define(self, *args: Any, **kwargs: Any) -> None:
        """Add new custom element."""
        if isinstance(args[0], str):
            self._define_orig(*args, **kwargs)
        elif isinstance(args[0], type):
            self._define_class(*args, **kwargs)
        else:
            raise TypeError(
                'Invalid argument for define: {}, {}'.format(args, kwargs))
def define ( self , * args : Any , ** kwargs : Any ) -> None : if isinstance ( args [ 0 ] , str ) : self . _define_orig ( * args , ** kwargs ) elif isinstance ( args [ 0 ] , type ) : self . _define_class ( * args , ** kwargs ) else : raise TypeError ( 'Invalid argument for define: {}, {}' . format ( args , kwargs ) )
Add new custom element.