code: def test_weighted(self):
      g, checker = weighted_tree(is_directed=True)
  
      bfw = DirectedBreadthFirstNeighbours(g)
      walks = bfw.run(
          nodes=[0],
          n=10,
          in_size=[20, 20],
          out_size=[20, 20],
          weighted=True,
      )
  
      checker(
          node_id for walk in walks for hop in walk for node_id in hop
      )
  
file_path: stellargraph/tests/data/test_directed_breadth_first_sampler.py
imports: import random
  import pytest
  import pandas
  import numpy
  from stellargraph.data.explorer import DirectedBreadthFirstNeighbours
  from stellargraph.core.graph import StellarDiGraph
  from ..test_utils.graphs import create_test_graph, tree_graph, example_graph_random, weighted_tree
label_desc: Use image node_id 7 for calling the TestDirectedBreadthFirstNeighbours obj's underlying member method code with example usage: obj.test_weighted() without return types