code: def test_batch_feature_view():
      # A batch composed of 5 graphs with node num being 10, 20, ..., 50 respectively
      graphs = []
      features = []
      for i in range(5):
          j = i + 1
          g = GraphData()
          g.add_nodes(j * 10)
          feature = torch.ones(size=(g.get_node_num(), 100))
          g.node_features["node_feat"] = feature
          graphs.append(g)
          features.append(feature)
  
      batch_graph = to_batch(graphs)
      assert torch.all(
          torch.eq(
              batch_graph.batch_node_features["node_feat"],
              torch.nn.utils.rnn.pad_sequence(
                  features, batch_first=True
              ),
          )
      )
  
      assert batch_graph.split_node_features["node_feat"][0].shape == (
          10,
          100,
      )
      assert batch_graph.split_node_features["node_feat"][1].shape == (
          20,
          100,
      )
      assert batch_graph.split_node_features["node_feat"][2].shape == (
          30,
          100,
      )
      assert batch_graph.split_node_features["node_feat"][3].shape == (
          40,
          100,
      )
      assert batch_graph.split_node_features["node_feat"][4].shape == (
          50,
          100,
      )
  
imports: import gc
  import time
  import matplotlib.pyplot
  import torch
  import torch.nn
  import pytest
  from ...data.data import GraphData, from_batch, from_dgl, to_batch
  from ...data.utils import EdgeNotFoundException, SizeMismatchException
label_desc: Use image node_id 12 for calling a global function with example usage: test_batch_feature_view() without return types