code: def test_copy_hetero_data():
      data = HeteroData()
      data["paper"].x = x_paper
      data["paper", "to", "paper"].edge_index = edge_index_paper_paper
  
      out = copy.copy(data)
      assert id(data) != id(out)
      assert len(data.stores) == len(out.stores)
      for store1, store2 in zip(data.stores, out.stores):
          assert id(store1) != id(store2)
          assert id(data) == id(store1._parent())
          assert id(out) == id(store2._parent())
      assert out["paper"]._key == "paper"
      assert data["paper"].x.data_ptr() == out["paper"].x.data_ptr()
      assert out["to"]._key == ("paper", "to", "paper")
      assert (
          data["to"].edge_index.data_ptr()
          == out["to"].edge_index.data_ptr()
      )
  
      out = copy.deepcopy(data)
      assert id(data) != id(out)
      assert len(data.stores) == len(out.stores)
      for store1, store2 in zip(data.stores, out.stores):
          assert id(store1) != id(store2)
      assert id(out) == id(out["paper"]._parent())
      assert out["paper"]._key == "paper"
      assert data["paper"].x.data_ptr() != out["paper"].x.data_ptr()
      assert data["paper"].x.tolist() == out["paper"].x.tolist()
      assert id(out) == id(out["to"]._parent())
      assert out["to"]._key == ("paper", "to", "paper")
      assert (
          data["to"].edge_index.data_ptr()
          != out["to"].edge_index.data_ptr()
      )
      assert (
          data["to"].edge_index.tolist()
          == out["to"].edge_index.tolist()
      )
  
imports: import copy
  import pytest
  import torch
  from torch_geometric.data import HeteroData
  from torch_geometric.data.storage import EdgeStorage
  from torch_geometric.testing import get_random_edge_index, get_random_tensor_frame, withPackage
  from torch_geometric.typing import TensorFrame
label_desc: Use image node_id 9 for calling a global function with example usage: test_copy_hetero_data() without return types