code: def test_nodemapper_weighted():
      g, checker = weighted_tree()
  
      gen = GraphSAGENodeGenerator(g, 7, [10, 6], weighted=True)
      samples = gen.flow([0] * 10)
  
      checker(
          node_id
          for array in samples[0][0]
          for node_id in array.ravel()
      )
  
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 13 for calling a global function with example usage: test_nodemapper_weighted() without return types