def remove_imports(partitions, to_remove=()):
    to_remove_imports = set(
        import_obj_from_str(imp_statement) for imp_statement in to_remove
    )

    def _inner():
        for partition in partitions:
            if (
                    partition.code_type is not CodeType.IMPORT or
                    to_remove_imports not in import_obj_from_str(partition.src)
            ):
                yield partition

    return list(_inner())
dataset/ETHPy150Open asottile/reorder_python_imports/reorder_python_imports/main.py/remove_imports/swapped operands of `not in`