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