code: def _hide_layer_and_module_methods():
      """Hide methods and properties defined in the base classes of keras layers."""
      # __dict__ only sees attributes defined in *this* class, not on parent classes
      # Needed to ignore redudant subclass documentation
      module_contents = list(tf.Module.__dict__.items())
      layer_contents = list(tf.keras.layers.Layer.__dict__.items())
  
      for name, obj in module_contents + layer_contents:
          if name == "__init__":
              continue
  
          if isinstance(obj, property):
              obj = obj.fget
  
          if isinstance(obj, (staticmethod, classmethod)):
              obj = obj.__func__
  
          try:
              doc_controls.do_not_doc_in_subclasses(obj)
          except AttributeError:
              pass
  
file_path: text/oss_scripts/build_docs.py
imports: import os
  from absl import app
  from absl import flags
  import tensorflow
  from tensorflow_docs.api_generator import doc_controls
  from tensorflow_docs.api_generator import generate_lib
  from tensorflow_docs.api_generator import public_api
  import tensorflow_text
label_desc: Use image node_id 1 for calling a global function with example usage: _hide_layer_and_module_methods() without return types