code: def test_unsupervised(petersen_graph, shuffle):
      assert_reproducible(
          lambda: unsup_gs(
              petersen_graph,
              [2, 2],
              tf.optimizers.Adam(1e-3),
              epochs=4,
              walk_length=2,
              batch_size=4,
              shuffle=shuffle,
          )
      )
  
imports: import numpy
  import pytest
  import random
  import tensorflow
  from stellargraph.data.unsupervised_sampler import UnsupervisedSampler
  from stellargraph.mapper.sampled_node_generators import GraphSAGENodeGenerator
  from stellargraph.mapper.sampled_link_generators import GraphSAGELinkGenerator
  from stellargraph.layer.graphsage import GraphSAGE
  from stellargraph.layer.link_inference import link_classification
  from stellargraph.random import set_seed
  from ..test_utils import flaky_xfail_mark
  from ..test_utils.graphs import petersen_graph
  from .fixtures import assert_reproducible
  from ..None import require_gpu
label_desc: Use image node_id 7 for calling a global function with example usage: test_unsupervised(petersen_graph, shuffle) without return types