text: import torch
  import random
  import os
  import numpy as np
  
  
  def set_all_seeds(seed):
      os.environ["PL_GLOBAL_SEED"] = str(seed)
      random.seed(seed)
      np.random.seed(seed)
      torch.manual_seed(seed)
      torch.cuda.manual_seed_all(seed)
  
  
  def set_deterministic():
      if torch.cuda.is_available():
          torch.backends.cudnn.benchmark = False
          torch.backends.cudnn.deterministic = True
      torch.set_deterministic(True)
  