def optional(deco):
    """
    decorator option은 kwargs만 허용
    :param deco:
    :return:
    """
    @functools.wraps(deco)
    def dispatcher(*args, **kwargs):
        decorator = deco(**kwargs)
        if args:
            assert len(args) == 1
            return decorator(args[0])
        else:
            return decorator
    return dispatcher
def optional(deco):
    """
    decorator option은 kwargs만 허용
    :param deco:
    :return:
    """
    @functools.wraps(deco)
    def dispatcher(*args, **kwargs):
        decorator = deco(**kwargs)
        if args:
            assert len(args) == 1
            return decorator(args[0])
        else:
            return decorator
    return dispatcher
def optional ( deco ) : @ functools . wraps ( deco ) def dispatcher ( * args , * * kwargs ) : decorator = deco ( * * kwargs ) if args : assert len ( args ) == 1 return decorator ( args [ 0 ] ) else : return decorator return dispatcher
decorator option은 kwargs만 허용
    :param deco:
    :return:
decorator option은 kwargs만 허용 : param deco : : return :