code: def collect_new_shareds():
      r"""Return all the `SharedVariable`\s created within this context manager."""
      global __SHARED_CONTEXT__
      old_context = __SHARED_CONTEXT__
      context = []
      try:
          __SHARED_CONTEXT__ = context
          yield context
      finally:
          __SHARED_CONTEXT__ = old_context
  
file_path: pytensor/pytensor/compile/sharedvalue.py
imports: import copy
  from contextlib import contextmanager
  from functools import singledispatch
  from typing import TYPE_CHECKING, Optional
  from pytensor.graph.basic import Variable
  from pytensor.graph.utils import add_tag_trace
  from pytensor.link.basic import Container
  from pytensor.link.c.type import generic
label_desc: Use image node_id 1 for calling a global function with example usage: collect_new_shareds() without return types