code: def seed(seed, device="all"):  # pylint: disable=redefined-outer-name
      r"""Seeds the random number generators in MXNet.
  
      This affects the behavior of modules in MXNet that uses random number generators,
      like the dropout operator and `ndarray`'s random sampling operators.
  
      Parameters
      ----------
      seed : int
          The random number seed.
  
      device : Device
          The device context of the generator. The default is "all" which means seeding random
          number generators of all devices.
  
      Notes
      -----
      Random number generators in MXNet are device specific.
      `npx.random.seed(seed)` sets the state of each generator using `seed` and the
      device id. Therefore, random numbers generated from different devices can be different
      even if they are seeded using the same seed.
  
      To produce identical random number sequences independent of the device id,
      set optional `device` argument. This produces the same sequence of random numbers independent
      of the device id, but the sequence can be different on different kind of devices as MXNet's
      random number generators for CPU and GPU use different algorithms.
  
      Example
      -------
      >>> from mxnet import np, npx
      >>> npx.set_np()
      >>> npx.random.seed(0)
      >>> np.random.uniform()
      array(0.5488135)
      >>> npx.random.seed(128)
      >>> np.random.uniform()
      array(0.03812965)
      >>> npx.random.seed(128)
      >>> np.random.uniform()
      array(0.03812965)
      >>> npx.random.seed(128)
      >>> np.random.uniform(device=npx.gpu(0))
      array(0.9894903, device=gpu(0))
      >>> npx.random.seed(128)
      >>> np.random.uniform(device=npx.gpu(0))
      array(0.9894903, device=gpu(0))
      """
      _mx_rand.seed(seed_state=seed, device=device)
  
imports: from ..None import random
  from ..ndarray import numpy_extension
  from ..util import wrap_ctx_to_device_func
label_desc: Use image node_id 1 for calling a global function with example usage: seed(seed, device) without return types