code: def create_rnd(seed):
      assert isinstance(
          seed, int
      ), "Seed has to be integer but was {} {}".format(
          repr(seed), type(seed)
      )
      if opt.has_numpy:
          if SETTINGS.CONFIG.NUMPY_RANDOM_LEGACY_API:
              return opt.np.random.RandomState(seed)
          else:
              return opt.np.random.default_rng(seed)
      else:
          return random.Random(seed)
  
imports: import random
  import sacred.optional
  from sacred.settings import SETTINGS
  from sacred.utils import module_is_in_cache
label_desc: Use image node_id 2 for calling a global function with example usage: create_rnd(seed) and returns: random, opt, opt