number of positional arguments values. Dynamically computed from the arguments attribute.

def _nargs(f) -> Optional[int]:
    '''
        number of positional arguments values. Dynamically computed from the arguments attribute.
    '''
    if isinstance(f, Function):
        return f.nargs
    spec = inspect.getfullargspec(f)
    if spec.varargs is not None:
        return None
    return len(spec.args)