class_docstr: Visitor to use with `traverse` to visit exactly the public TF API.
docstr: Visitor interface, see `traverse` for details.
code: def __call__(self, path, parent, children):
      """Visitor interface, see `traverse` for details."""
  
      # Avoid long waits in cases of pretty unambiguous failure.
      if tf_inspect.ismodule(parent) and len(path.split(".")) > 10:
          raise RuntimeError(
              "Modules nested too deep:\n%s.%s\n\nThis is likely a "
              "problem with an accidental public import."
              % (self._root_name, path)
          )
  
      # Includes self._root_name
      full_path = (
          ".".join([self._root_name, path]) if path else self._root_name
      )
  
      # Remove things that are not visible.
      for name, child in list(children):
          if self._is_private(full_path, name, child):
              children.remove((name, child))
  
      self._visitor(path, parent, children)
  
      # Remove things that are visible, but which should not be descended into.
      for name, child in list(children):
          if self._do_not_descend(full_path, name):
              children.remove((name, child))
  
file_path: tensorflow-upstream/tensorflow/tools/common/public_api.py
imports: import re
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 7 for calling the PublicAPIVisitor obj's underlying member method code with example usage: obj.__call__(path, parent, children) without return types