'Return a set of the allowed number of arguments for the function.
Examples
>>> from sympy.core.function import Function
>>> from sympy.abc import x, y
>>> f = Function(\'f\')
If the function can take any number of arguments, the set of whole
numbers is returned:
>>> Function(\'f\').nargs
S.Naturals0
If the function was initialized to accept one or more arguments, a
corresponding set will be returned:
>>> Function(\'f\', nargs=1).nargs
{1}
>>> Function(\'f\', nargs=(2, 1)).nargs
{1, 2}
The undefined function, after application, also has the nargs
attribute; the actual number of arguments is always available by
checking the ``args`` attribute:
>>> f = Function(\'f\')
>>> f(1).nargs
S.Naturals0
>>> len(f(1).args)
1'

@property
def nargs(self):

    from sympy.sets.sets import FiniteSet
    return (FiniteSet(*self._nargs) if self._nargs else S.Naturals0)
