code: def test_hgt_conv_missing_input_node_type():
      data = HeteroData()
      data["author"].x = torch.randn(4, 16)
      data["paper"].x = torch.randn(6, 32)
      data[
          "author", "writes", "paper"
      ].edge_index = get_random_edge_index(4, 6, 20)
  
      # Some nodes from metadata are missing in data.
      # This might happen while using NeighborLoader.
      metadata = (
          ["author", "paper", "university"],
          [("author", "writes", "paper")],
      )
      conv = HGTConv(-1, 64, metadata, heads=1)
  
      out_dict = conv(data.x_dict, data.edge_index_dict)
      assert out_dict["paper"].size() == (6, 64)
      assert "university" not in out_dict
  
file_path: pytorch_geometric/test/nn/conv/test_hgt_conv.py
imports: import torch
  import torch_geometric.typing
  from torch_geometric.data import HeteroData
  from torch_geometric.nn import HGTConv
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import get_random_edge_index, withPackage
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import coalesce, to_torch_csc_tensor
label_desc: Use image node_id 6 for calling a global function with example usage: test_hgt_conv_missing_input_node_type() without return types