code: def test_hinsage_homogeneous_inference():
      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_type argument isn't required
      mapper = HinSAGENodeGenerator(
          G, batch_size=batch_size, num_samples=num_samples
      )
  
      assert mapper.head_node_types == ["n-0"]
  
      nodes = [1, 4, 2]
      seq = mapper.flow(nodes)
      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) == samples_per_head
  
          assert samples[0].shape == (this_batch_size, 1, feature_size)
          for i in range(1, 1 + edge_types):
              assert samples[i].shape == (
                  this_batch_size,
                  num_samples[0],
                  feature_size,
              )
          for i in range(1 + edge_types, samples_per_head):
              assert samples[i].shape == (
                  this_batch_size,
                  np.product(num_samples),
                  feature_size,
              )
  
          assert labels is None
  
imports: from stellargraph.core.graph import *
  from stellargraph.mapper import *
  import networkx
  import numpy
  import random
  import pytest
  import pandas
  import scipy.sparse
  from ..test_utils.graphs import example_graph, example_graph_random, example_hin_1, create_graph_features, repeated_features, weighted_tree
  from ..None import test_utils
label_desc: Use image node_id 26 for calling a global function with example usage: test_hinsage_homogeneous_inference() without return types