def test_modify_uns_in_copy():
    # https://github.com/theislab/anndata/issues/571
    adata = ad.AnnData(np.ones((5, 5)), uns={"parent": {"key": "value"}})
    adata_copy = adata[:3].copy()
    adata_copy.uns["parent"]["key"] = "new_value"
    assert adata.uns["parent"]["key"] != adata_copy.uns["parent"]["key"]
def each(f):
        if f.body:
            f.hashes = []
            for hash_type, h in HashFile.extract_hashes(f.body.contents):
                hash_object = Hash.get_or_create(value=h.hexdigest())
                hash_object.add_source("analytics")
                hash_object.save()
                f.active_link_to(
                    hash_object,
                    "{} hash".format(hash_type.upper()),
                    "HashFile",
                    clean_old=False,
                )
                f.hashes.append({"hash": hash_type, "value": h.hexdigest()})
            f.save()