class_docstr: Tests of HinSAGELinkGenerator class
code: def test_HinSAGELinkGenerator_homogeneous_inference(self):
      feature_size = 4
      edge_types = 3
      batch_size = 2
      num_samples = [5, 7]
      G = example_graph_random(
          feature_size=feature_size, node_types=1, edge_types=edge_types
      )
  
      # G is homogeneous so the head_node_types argument isn't required
      mapper = HinSAGELinkGenerator(
          G, batch_size=batch_size, num_samples=num_samples
      )
  
      assert mapper.head_node_types == ["n-0", "n-0"]
  
      links = [(1, 4), (2, 3), (4, 1)]
      seq = mapper.flow(links)
      assert len(seq) == 2
  
      samples_per_head = 1 + edge_types + edge_types * edge_types
      for batch_idx, (samples, labels) in enumerate(seq):
          this_batch_size = {0: batch_size, 1: 1}[batch_idx]
  
          assert len(samples) == 2 * samples_per_head
  
          for i in range(0, 2):
              assert samples[i].shape == (
                  this_batch_size,
                  1,
                  feature_size,
              )
          for i in range(2, 2 * (1 + edge_types)):
              assert samples[i].shape == (
                  this_batch_size,
                  num_samples[0],
                  feature_size,
              )
          for i in range(2 * (1 + edge_types), 2 * samples_per_head):
              assert samples[i].shape == (
                  this_batch_size,
                  np.product(num_samples),
                  feature_size,
              )
  
          assert labels is None
  
imports: import numpy
  import networkx
  import pytest
  import random
  from stellargraph.mapper import *
  from stellargraph.core.graph import *
  from stellargraph.data.unsupervised_sampler import *
  from ..test_utils.graphs import example_graph, example_graph_random, example_hin_1, repeated_features, weighted_tree
  from ..None import test_utils
label_desc: Use image node_id 3 for calling the Test_HinSAGELinkGenerator obj's underlying member method code with example usage: obj.test_HinSAGELinkGenerator_homogeneous_inference() without return types