code: def custom_getter_scope(custom_getter):
      """
      Args:
          custom_getter: the same as in :func:`tf.get_variable`
  
      Returns:
          The current variable scope with a custom_getter.
      """
      scope = tf.get_variable_scope()
      if get_tf_version_tuple() >= (1, 5):
          with tf.variable_scope(
              scope,
              custom_getter=custom_getter,
              auxiliary_name_scope=False,
          ):
              yield
      else:
          ns = tf.get_default_graph().get_name_scope()
          with tf.variable_scope(scope, custom_getter=custom_getter):
              with tf.name_scope(ns + "/" if ns else ""):
                  yield
  
imports: from contextlib import contextmanager
  from ..utils import logger
  from ..compat import tfv1
  from .common import get_tf_version_tuple
label_desc: Use image node_id 1 for calling a global function with example usage: custom_getter_scope(custom_getter) without return types