def getfullargspec(func):
    """Compatibility function to provide inspect.getfullargspec in Python 2

    This should be rewritten using a backport of Python 3 signature
    once we drop support for Python 2.6. We went for a simpler
    approach at the time of writing because signature uses OrderedDict
    which is not available in Python 2.6.
    """
    try:
        return inspect.getfullargspec(func)
    except __HOLE__:
        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={})
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/externals/joblib/func_inspect.py/getfullargspec