def _wrap_log(func, level):  # noqa: D202
    """Wrap func to be called with level parameter and appear as that level.

    func should be _log.

    Args:
        func: function to wrap
        level: logging level to use

    Returns:
        wrapped function that appears to have name specified by level.

    """

    def wrapped_func(*args, **kwargs):
        return func(level, *args, **kwargs)

    wrapped_func.__name__ = level
    return wrapped_func