class_docstr: Tests of HinSAGELinkGenerator class
code: def test_HinSAGELinkGenerator_1(self):
      G = example_hin_1(self.n_feat)
      links = [
          (1, 4),
          (1, 5),
          (0, 4),
          (0, 5),
      ]  # selected ('movie', 'user') links
      data_size = len(links)
      link_labels = [0] * data_size
  
      mapper = HinSAGELinkGenerator(
          G,
          batch_size=self.batch_size,
          num_samples=self.num_samples,
          head_node_types=["A", "B"],
      ).flow(links, link_labels)
  
      assert len(mapper) == 2
  
      for batch in range(len(mapper)):
          nf, nl = mapper[batch]
          assert len(nf) == 10
          assert nf[0].shape == (self.batch_size, 1, self.n_feat["A"])
          assert nf[1].shape == (self.batch_size, 1, self.n_feat["B"])
          assert nf[2].shape == (
              self.batch_size,
              self.num_samples[0],
              self.n_feat["B"],
          )
          assert nf[3].shape == (
              self.batch_size,
              self.num_samples[0],
              self.n_feat["B"],
          )
          assert nf[4].shape == (
              self.batch_size,
              self.num_samples[0],
              self.n_feat["A"],
          )
          assert nf[5].shape == (
              self.batch_size,
              np.multiply(*self.num_samples),
              self.n_feat["B"],
          )
          assert nf[6].shape == (
              self.batch_size,
              np.multiply(*self.num_samples),
              self.n_feat["A"],
          )
          assert nf[7].shape == (
              self.batch_size,
              np.multiply(*self.num_samples),
              self.n_feat["B"],
          )
          assert nf[8].shape == (
              self.batch_size,
              np.multiply(*self.num_samples),
              self.n_feat["A"],
          )
          assert nf[9].shape == (
              self.batch_size,
              np.multiply(*self.num_samples),
              self.n_feat["B"],
          )
  
      with pytest.raises(IndexError):
          nf, nl = mapper[2]
  
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 4 for calling the Test_HinSAGELinkGenerator obj's underlying member method code with example usage: obj.test_HinSAGELinkGenerator_1() without return types