class_docstr: Tests of HinSAGELinkGenerator class
code: def test_HinSAGELinkGenerator_constructor_multiple_link_types(self):
      G = example_hin_1(self.n_feat)
  
      # first 3 are ('movie', 'user') links, the last is ('user', 'movie') link.
      links = [(1, 4), (1, 5), (0, 4), (5, 0)]
      link_labels = [0] * len(links)
  
      with pytest.raises(ValueError):
          HinSAGELinkGenerator(
              G,
              batch_size=self.batch_size,
              num_samples=self.num_samples,
              head_node_types=["A", "B"],
          ).flow(links, link_labels)
  
      # all edges in G, which have multiple link types
      links = G.edges()
      link_labels = [0] * len(links)
  
      with pytest.raises(ValueError):
          HinSAGELinkGenerator(
              G,
              batch_size=self.batch_size,
              num_samples=self.num_samples,
              head_node_types=["B", "B"],
          ).flow(links, link_labels)
  
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 2 for calling the Test_HinSAGELinkGenerator obj's underlying member method code with example usage: obj.test_HinSAGELinkGenerator_constructor_multiple_link_types() without return types