code: def test_extract(
      self, setup, kg, root, max_depth, max_walks, with_reverse
  ):
      root = f"{URL}#{root}"
      walks = NGramWalker(
          max_depth,
          max_walks,
          with_reverse=with_reverse,
          random_state=42,
          grams=2,
      )._extract(kg, Vertex(root))[root]
      if max_walks is not None:
          if with_reverse:
              assert len(walks) <= max_walks * max_walks
          else:
              assert len(walks) <= max_walks
      for walk in walks:
          if not with_reverse:
              assert walk[0] == root
  
      for walk in walks[2::2]:
          if len(walk) > 1:
              assert walk[2].isnumeric()
  
imports: import itertools
  import pytest
  from pyrdf2vec.graphs import KG, Vertex
  from pyrdf2vec.walkers import NGramWalker
label_desc: Use image node_id 2 for calling the TestNGramWalker obj's underlying member method code with example usage: obj.test_extract(setup, kg, root, max_depth, max_walks, with_reverse) without return types