code: def use_registry(
      registry: DslContextRegistry,
  ) -> Iterator[DslContextRegistry]:
      """Use the given registry as a global scope."""
      old_registry = get()
      _registry_holder.current = registry
      try:
          with registry.temporary_mutable():
              yield registry
      finally:
          _registry_holder.current = old_registry
  
imports: import collections
  import contextlib
  import threading
  from typing import Any, List, Optional, Iterator
  from tfx.dsl.context_managers import dsl_context
label_desc: Use image node_id 3 for calling a global function with example usage: use_registry(registry) without return types