def get_db_file_in_memory(
    db_file: Optional[str] = None, in_memory: bool = False
) -> Optional[str]:
    """Get in-memory db_file and check that conflicting arguments are not provided."""
    if in_memory:
        if db_file and db_file != ":memory:":
            raise RuntimeError("A db_file cannot be specified if in_memory is True")
        db_file = ":memory:"
    return db_file
Get in-memory db_file and check that conflicting arguments are not provided.
src/datachain/data_storage/sqlite.py