def _whichever(x, y):
    """Returns whichever of `x` and `y` is not `None`.

    If both `x` and `y` are not `None`, returns `x`.

    If both `x` and `y` are `None`, returns `None`.
    """
    return y if x is None else x