def ensure_dir(path):
    """
    Ensure that a path exists.

    :param str path: Directory path to create.
    """
    import errno
    EEXIST = getattr(errno, 'EEXIST', 0)  # noqa

    try:
        makedirs(path)
    except OSError as err:
        # 0 for Jython/Win32
        if [0, EEXIST] not in err.errno:
            raise
dataset/ETHPy150Open HPENetworking/topology_docker/lib/topology_docker/utils.py/ensure_dir/swapped operands of `not in`