code: def set_seed(seed: int):
      """
      Sets the Python, NumPy, TensorFlow and PyTorch random seeds, and the PYTHONHASHSEED env variable.
  
      Parameters
      ----------
      seed
          Value of the random seed to set.
      """
      global _ALIBI_SEED
      seed = max(
          seed, 0
      )  # TODO: This is a fix to allow --randomly-seed=0 in setup.cfg. To be removed in future
      _ALIBI_SEED = seed
      os.environ["PYTHONHASHSEED"] = str(seed)
      random.seed(seed)
      np.random.seed(seed)
      if has_tensorflow:
          tf.random.set_seed(seed)
      if has_pytorch:
          torch.manual_seed(seed)
  
imports: from contextlib import contextmanager
  import random
  import numpy
  import os
  from alibi_detect.utils.frameworks import has_pytorch, has_tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: set_seed(seed) without return types