code: def test_invalid_keys():
      data = HeteroData()
  
      data["paper"].x = torch.randn(10, 128)
      data["paper"].node_attrs = ["y"]
      data["paper", "paper"].edge_index = get_random_edge_index(
          10, 10, 20
      )
      data["paper", "paper"].edge_attrs = ["edge_attr"]
  
      assert data["paper"].node_attrs() == ["x"]
      assert data["paper"]["node_attrs"] == ["y"]
      assert data["paper", "paper"].edge_attrs() == ["edge_index"]
      assert data["paper", "paper"]["edge_attrs"] == ["edge_attr"]
  
      out = data.to_homogeneous()
      assert set(out.node_attrs()) == {"x", "node_type"}
      assert set(out.edge_attrs()) == {"edge_index", "edge_type"}
  
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 19 for calling a global function with example usage: test_invalid_keys() without return types