def _inspect_getargspec(fn):
    'Returns `inspect.getargspec(fn)` for Py2 and `inspect.getfullargspec(fn)`\n    for Py3\n    '
    try:
        return inspect.getfullargspec(fn)
    except AttributeError:
        try:
            return inspect.getargspec(fn)
        except TypeError:
            return inspect.getargspec(fn.__call__)
Returns `inspect.getargspec(fn)` for Py2 and `inspect.getfullargspec(fn)`
for Py3
def _inspect_getargspec(fn):
    'Returns `inspect.getargspec(fn)` for Py2 and `inspect.getfullargspec(fn)`\n    for Py3\n    '
    try:
        return inspect.getfullargspec(fn)
    except AttributeError:
        try:
            return inspect.getargspec(fn)
        except TypeError:
            return inspect.getargspec(fn.__call__)