def getfullargspec(func):
    try:
        return inspect.getfullargspec(func)
    except AttributeError:
        arg_spec = inspect.getargspec(func)
        import collections
        tuple_fields = ('args varargs varkw defaults kwonlyargs '
                        'kwonlydefaults annotations')
        tuple_type = collections.namedtuple('FullArgSpec', tuple_fields)

        return tuple_type(args=arg_spec.args,
                          varargs=arg_spec.varargs,
                          varkw=arg_spec.keywords,
                          defaults=arg_spec.defaults,
                          kwonlyargs=[],
                          kwonlydefaults=None,
                          annotations={})
Provide a transactional scope around a series of operations.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/externals/joblib/func_inspect.py/getfullargspec--crossover with--dataset/ETHPy150Open ottogroup/palladium/palladium/util.py/session_scope