@staticmethod
def _validate_callable(f):
    """
        Validate the callable parameter to `_ValidatedFunction`

        Parameters
        ----------
        f : callable
            The callable parameter that we wish to validate.

        Returns
        -------
        orig_f : callable
            The original callable parameter if it is valid.

        Raises
        ------
        TypeError : the callable input is invalid.
        """
    msg = 'Invalid function parameter provided'
    valid_callable = callable(f) and hasattr(f, '__code__')
    valid_callable = valid_callable and hasattr(f.__code__, 'co_varnames')
    if not valid_callable:
        raise ValueError(msg)
    return f
