code: def test_link_encoder():
      num_nodes = 3
      num_edges = 6
      edge_attr = torch.rand((num_edges, 10))
      edge_index = torch.randint(
          low=0, high=num_nodes, size=(2, num_edges)
      )
      edge_time = torch.rand(num_edges)
      seed_time = torch.ones(num_nodes)
  
      encoder = LinkEncoder(
          k=3,
          in_channels=edge_attr.size(1),
          hidden_channels=7,
          out_channels=11,
          time_channels=13,
      )
      encoder.reset_parameters()
      assert str(encoder) == (
          "LinkEncoder(k=3, in_channels=10, "
          "hidden_channels=7, out_channels=11, "
          "time_channels=13, dropout=0.0)"
      )
  
      out = encoder(edge_index, edge_attr, edge_time, seed_time)
      assert out.size() == (num_nodes, 11)
  
imports: import torch
  from torch_geometric.nn.models.graph_mixer import LinkEncoder, NodeEncoder, get_latest_k_edge_attr
label_desc: Use image node_id 2 for calling a global function with example usage: test_link_encoder() without return types