def METHOD_NAME(f: Union[nn.Module, Callable[..., Any]]) -> List[str]:
    """
    Returns the argument names of a Python function or ``nn.Module``.
    """
    if isinstance(f, nn.Module):
        return _get_argnames(f.forward)
    return _get_argnames(f)