'Wrap callables that don\'t accept a context.
This is to allow easy compatiblity with default callables
that aren\'t specific to accepting of a context.'

def _maybe_wrap_callable(self, fn):

    try:
        argspec = util.get_callable_argspec(fn, no_self=True)
    except TypeError:
        return (lambda ctx: fn())
    defaulted = (((argspec[3] is not None) and len(argspec[3])) or 0)
    positionals = (len(argspec[0]) - defaulted)
    if (positionals == 0):
        return (lambda ctx: fn())
    elif (positionals == 1):
        return fn
    else:
        raise exc.ArgumentError('ColumnDefault    Python    function    takes    zero    or    one    positional    arguments')
