@functools.wraps(init_func)
def wrapped(self, *args, **kwargs):
    try:
        from_config_func = type(self).from_config
    except AttributeError as e:
        raise AttributeError("Class with @configurable must have a 'from_config' classmethod.") from e
    if (not inspect.ismethod(from_config_func)):
        raise TypeError("Class with @configurable must have a 'from_config' classmethod.")
    if _called_with_cfg(*args, **kwargs):
        explicit_args = _get_args_from_config(from_config_func, *args, **kwargs)
        init_func(self, **explicit_args)
    else:
        init_func(self, *args, **kwargs)
@functools.wraps(init_func)
def wrapped(self, *args, **kwargs):
    try:
        from_config_func = type(self).from_config
    except AttributeError as e:
        raise AttributeError("Class with @configurable must have a 'from_config' classmethod.") from e
    if (not inspect.ismethod(from_config_func)):
        raise TypeError("Class with @configurable must have a 'from_config' classmethod.")
    if _called_with_cfg(*args, **kwargs):
        explicit_args = _get_args_from_config(from_config_func, *args, **kwargs)
        init_func(self, **explicit_args)
    else:
        init_func(self, *args, **kwargs)