def WithIO(obj, IO_type=None, IO_lookup=None, **kwargs):
    if IO_type is None:
        raise ContainerError("IO_type is required.")
    
    if IOType not in IO_type:
        raise ContainerError("Unknown IO_type: %s" % IO_type)
    
    if kwargs is None:
        kwargs = {}

    if IO_lookup is None:
        IO_lookup = IOLookup

    obj_type = obj.__class__
    kwargs['Object'] = obj

    if obj_type in IO_lookup:
        reader, writer = IO_lookup[obj_type]
    else:
        reader, writer = default_read_object, default_write_object
    
    kwargs['reader'] = reader
    kwargs['writer'] = writer

    return IOType[IO_type](**kwargs)
dataset/ETHPy150Open biocore/pyqi/pyqi/core/container.py/WithIO/swapped operands of `not in`