code: def _random_stateless_uniform(
      shape: types.IntTensor,
      num_digits: types.IntTensor,
      seed: int,
      validate_args: bool = False,
      dtype: tf.DType = None,
      name: str = None,
  ) -> types.IntTensor:
      """Returns a `Tensor` drawn from a uniform distribution with a given `shape`.
  
      Args:
        shape: Positive scalar `Tensor` of integers with rank 1. The shape of the
          returned `Tensor`.
        num_digits: Positive scalar `Tensor` of integers with rank 0. the base-2
          precision of the points which can be sampled from `generating_matrices`.
        seed: Positive scalar `Tensor` with shape [2] and dtype `int32` used as seed
          for the random generator.
        validate_args: Python `bool` indicating whether to validate arguments.
          Default value: `False`.
        dtype: Optional `dtype`. The `dtype` of the output `Tensor` (either
          `tf.int32` or `tf.int64`).
          Default value: `None` which maps to `tf.int32`.
        name: Python `str` name prefixed to ops created by this function.
          Default value: `None` which maps to `random_stateless_uniform`.
  
      Returns:
        A `Tensor` with the requested `shape`.
      """
  
      with tf.name_scope(name or "random_stateless_uniform"):
          dtype = dtype or tf.int32
  
          shape = tf.convert_to_tensor(shape, dtype=dtype, name="dim")
          num_digits = tf.convert_to_tensor(
              num_digits, dtype=dtype, name="num_digits"
          )
  
          control_deps = []
          if validate_args:
              control_deps.append(
                  tf.debugging.assert_positive(
                      shape, message="shape must be positive"
                  )
              )
              control_deps.append(
                  tf.debugging.assert_positive(
                      num_digits, message="num_digits must be positive"
                  )
              )
  
          with tf.control_dependencies(control_deps):
              minval = tf.cast(utils.exp2(num_digits - 1), dtype=dtype)
              maxval = tf.cast(utils.exp2(num_digits), dtype=dtype)
  
              return tf.random.stateless_uniform(
                  shape, seed, minval=minval, maxval=maxval, dtype=dtype
              )
  
file_path: tf-quant-finance/tf_quant_finance/math/qmc/digital_net.py
imports: import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance.math.qmc import utils
label_desc: Use image node_id 3 for calling a global function with example usage: _random_stateless_uniform(shape, num_digits, seed, validate_args, dtype, name) and returns: tf