class_docstr: Implements test parsing for ``` fenced cells.
  
  https://docs.python.org/3/library/doctest.html#doctestparser-objects
  
  The `get_examples` method receives a string and returns an
  iterable of `doctest.Example` objects.
class_docstr_tok: ["Implements","test","parsing","for","``","`","fenced","cells",".","https",":","\/\/docs.python.org\/3\/library\/doctest.html","#","doctestparser-objects","The","`","get_examples","`","method","receives","a","string","and","returns","an","iterable","of","`","doctest.Example","`","objects","."]
code: def get_examples(
      self, string: str, name: str = "<string>"
  ) -> Iterable[doctest.Example]:
      # Check for a file-level skip comment.
      if re.search(
          "<!--.*?doctest.*?skip.*?all.*?-->", string, re.IGNORECASE
      ):
          return
  
      for match in self.fence_cell_re.finditer(string):
          if re.search("doctest.*skip", match.group(0), re.IGNORECASE):
              continue
  
          groups = match.groupdict()
  
          source = textwrap.dedent(groups["doctest"])
          want = groups["output"]
          if want is not None:
              want = textwrap.dedent(want)
  
          yield doctest.Example(
              lineno=string[: match.start()].count("\n") + 1,
              source=source,
              want=want,
          )
  
file_path: tensorflow-upstream/tensorflow/tools/docs/fenced_doctest_lib.py
imports: import ast
  import doctest
  import os
  import re
  import textwrap
  from typing import Any, Callable, Dict, Iterable, Optional
  import astor
  from tensorflow.tools.docs import tf_doctest_lib
label_desc: Use image node_id 2 for calling the FencedCellParser obj's underlying member method code with example usage: obj.get_examples(string, name) without return types