code: def test_ClusterNodeSequence_getitem():
      G = create_stellargraph()
  
      nsg = ClusterNodeSequence(
          graph=G,
          clusters=[["a"], ["b"], ["c"], ["d"]],
          node_ids=["a", "b", "d"],
      )
  
      # 4 clusters with each cluster having a single node
      assert len(nsg) == 4
  
      for cluster in list(nsg):
          print(cluster)
          assert len(cluster) == 2
          # [features, target_node_indices, adj_cluster], cluster_targets
          assert len(cluster[0][0]) == 1
          assert len(cluster[0][1]) == 1
          assert cluster[0][2].shape == (
              1,
              1,
              1,
          )  # one node per cluster so adjacency matrix is 1x1
          assert cluster[1] is None  # no targets given
  
      # only 3 node_ids were specified
      assert len(nsg.node_order) == 3
  
      nodes = set()
      for node in nsg.node_order:
          nodes.add(node)
  
      assert len(nodes.intersection(["a", "b", "d"])) == 3
  
file_path: stellargraph/tests/mapper/test_cluster_gcn_node_mapper.py
imports: from stellargraph.mapper import ClusterNodeGenerator, ClusterNodeSequence
  from stellargraph.core.graph import StellarGraph
  import pandas
  import numpy
  import pytest
  from ..test_utils.graphs import example_graph_random
label_desc: Use image node_id 3 for calling a global function with example usage: test_ClusterNodeSequence_getitem() without return types