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 exceptions_log_path(cls, for_pid=None, in_dir=None):
        """Get the path to either the shared or pid-specific fatal errors log file."""
        if for_pid is None:
            intermediate_filename_component = ""
        else:
            assert isinstance(for_pid, Pid)
            intermediate_filename_component = ".{}".format(for_pid)
        in_dir = in_dir or cls._log_dir
        return os.path.join(
            in_dir, ".pids", "exceptions{}.log".format(intermediate_filename_component)
        )