class_docstr: Parser for Python source files that extracts TF API exports.
class_docstr_tok: ["Parser","for","Python","source","files","that","extracts","TF","API","exports","."]
docstr: Process top-level [Class|Function]Def for potential symbol export.
docstr_tok: ["Process","top-level","[","Class|Function","]","Def","for","potential","symbol","export","."]
code: def _process_def(
      self, node: Union[ast.ClassDef, ast.FunctionDef]
  ) -> None:
      """Process top-level [Class|Function]Def for potential symbol export."""
      # @tf_export(...)
      # [class|def] <id>:
      for decorator in node.decorator_list:
          if self._is_export_call(decorator):
              self._add_exported_symbol(
                  cast(ast.Call, decorator), node.name
              )
          else:
              self.visit(decorator)
  
      if isinstance(node, ast.ClassDef):
          for base in node.bases:
              self.visit(base)
          for kw in node.keywords:
              self.visit(kw)
      elif isinstance(node, ast.FunctionDef):
          self.visit(node.args)
          if node.returns:
              self.visit(node.returns)
  
      for stmt in node.body:
          self.visit(stmt)
  
imports: import ast
  from collections.abc import Sequence
  import re
  from typing import Any, Optional, Union, cast
  from absl import flags
  from absl import logging
  from tensorflow.python.tools.api.generator2.shared import exported_api
label_desc: Use image node_id 8 for calling the Parser obj's underlying member method code with example usage: obj._process_def(node) without return types