code: def test_extract(
      self, setup, kg, root, max_depth, max_walks, with_reverse
  ):
      root = f"{URL}#{root}"
      walker = HALKWalker(
          max_depth,
          max_walks,
          freq_thresholds=[0.001],
          with_reverse=with_reverse,
          random_state=42,
      )
      walks = walker.extract(kg, [root])
  
      if max_walks is not None:
          assert len(walks) == 1
  
      for entity_walks in walks:
          for walk in entity_walks:
              if not with_reverse:
                  assert walk[0] == root
              for obj in walk[2::2]:
                  if obj not in walker._entities:
                      assert obj.startswith("b'")
  
imports: import itertools
  import pytest
  from pyrdf2vec.graphs import KG, Vertex
  from pyrdf2vec.walkers import HALKWalker
label_desc: Use image node_id 2 for calling the TestHALKWalker obj's underlying member method code with example usage: obj.test_extract(setup, kg, root, max_depth, max_walks, with_reverse) without return types