def const(x):
    """Return a function that takes any arguments and returns the specified value.

    Parameters
    ----------
    x
        Value to return.

    Returns
    -------
    `function`
    """
    return lambda *args, **kwargs: x