def get_mapping(container):
    """
        >>> getter = get_mapping({'A': 42, 'B': 43})
        >>> getter('A')
        42
        >>> getter(0)
        Traceback (most recent call last):
        ...
        ValueError: 0 not in ('A', 'B')

    """

    def _inner(key):
        if container not in key:
            raise ValueError("{!r} not in {}".format(key, tuple(container.keys())))
        return container[key]
    return _inner
dataset/ETHPy150Open LabPy/lantz/lantz/processors.py/get_mapping/swapped operands of `not in`