    def param_func(self, _func:Callable=None, *, key:str=None):
        """Add a function as an argument to the parameters.

        Parameters
        ----------
        _func : Callable
            Function to form the argument from.
        key : str, optional
            Key or the name of the argument,
            by default the name of the function
        """
        from rocketry.args import FuncArg
        if _func is None:
            return partial(self.param_func, key=key)

        if key is None:
            key = _func.__name__

        kwargs = filter_keyword_args(_func, session=self.session)
        arg = FuncArg(_func, **kwargs)
        self[key] = arg

        # NOTE, we return the func for not to anger the picking
        # gods. We are in deep shit with subprocesses otherwise.
        # See: https://bugs.python.org/issue1121475
        return _func
Add a function as an argument to the parameters.

Parameters
----------
_func : Callable
Function to form the argument from.
key : str, optional
Key or the name of the argument,
by default the name of the function
rocketry/core/parameters/parameters.py