code: def numpy_seed(seed, *addl_seeds):
      """Context manager which seeds the NumPy PRNG with the specified seed and
      restores the state afterward"""
      if seed is None:
          yield
          return
      if len(addl_seeds) > 0:
          seed = int(hash((seed, *addl_seeds)) % 1e6)
      state = np.random.get_state()
      np.random.seed(seed)
      try:
          yield
      finally:
          np.random.set_state(state)
  
imports: import contextlib
  import itertools
  import logging
  import re
  import warnings
  from typing import Optional, Tuple
  import math
  import numpy
  import torch
  from fairseq.file_io import PathManager
  from fairseq import utils
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: numpy_seed(seed) without return types