def write(cow, in_mem):
    if cow and in_mem:
        return MemCOW
    elif cow and not in_mem:
        return DiskCOW
    else:
        return RW
Class signatures are identical so we can transparently use either.
dataset/ETHPy150Open psychomario/PyPXE/pypxe/nbd/writes.py/write