Decorator to use in order to transform a function into a schema.

def funcschema(default=None, *args, **kwargs):
    """Decorator to use in order to transform a function into a schema."""
    if default is None:
        return lambda default: funcschema(default=default, *args, **kwargs)

    return FunctionSchema(default=default, *args, **kwargs)