code: def deterministic_PRNG(seed=0):
      """Context manager that handles random.seed without polluting global state.
  
      See issue #1255 and PR #1295 for details and motivation - in short,
      leaving the global pseudo-random number generator (PRNG) seeded is a very
      bad idea in principle, and breaks all kinds of independence assumptions
      in practice.
      """
      if (
          hypothesis.core._hypothesis_global_random is None
      ):  # pragma: no cover
          hypothesis.core._hypothesis_global_random = random.Random()
          register_random(hypothesis.core._hypothesis_global_random)
  
      seed_all, restore_all = get_seeder_and_restorer(seed)
      seed_all()
      try:
          yield
      finally:
          restore_all()
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
imports: import contextlib
  import gc
  import random
  import sys
  import warnings
  from itertools import count
  from typing import TYPE_CHECKING, Any, Callable, Hashable, Tuple
  from weakref import WeakValueDictionary
  import hypothesis.core
  from hypothesis.errors import HypothesisWarning, InvalidArgument
  from hypothesis.internal.compat import GRAALPY, PYPY
label_desc: Use image node_id 3 for calling a global function with example usage: deterministic_PRNG(seed) without return types