code: def _patch_getattribute(cls, new_getattribute):
      orig_getattribute = (
          cls.__getattribute__
      )  # pytype: disable=attribute-error
      cls.__getattribute__ = new_getattribute
      try:
          yield
      finally:
          cls.__getattribute__ = orig_getattribute
  
file_path: sonnet/sonnet/src/custom_getter.py
imports: from typing import Any, Callable, ContextManager, Iterable, Optional, Type
  import contextlib
  from sonnet.src import base
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling a global function with example usage: _patch_getattribute(cls, new_getattribute) without return types