code: def _quasi_uniform(
      dim, sample_shape, random_type, dtype, seed=None, **kwargs
  ):
      """Quasi random draws from a uniform distribution on [0, 1)."""
      # Shape of the output
      output_shape = tf.concat([sample_shape] + [[dim]], -1)
      # Number of quasi random samples
      num_samples = tf.reduce_prod(sample_shape)
      # Number of initial low discrepancy sequence numbers to skip
      if "skip" in kwargs:
          skip = kwargs["skip"]
      else:
          skip = 0
      if random_type == RandomType.SOBOL:
          # Shape [num_samples, dim] of the Sobol samples
          low_discrepancy_seq = sobol.sample(
              dim=dim, num_results=num_samples, skip=skip, dtype=dtype
          )
      else:  # HALTON or HALTON_RANDOMIZED random_dtype
          if "randomization_params" in kwargs:
              randomization_params = kwargs["randomization_params"]
          else:
              randomization_params = None
          randomized = random_type == RandomType.HALTON_RANDOMIZED
          # Shape [num_samples, dim] of the Sobol samples
          low_discrepancy_seq, _ = halton.sample(
              dim=dim,
              sequence_indices=tf.range(skip, skip + num_samples),
              randomized=randomized,
              randomization_params=randomization_params,
              seed=seed,
              dtype=dtype,
          )
      return tf.reshape(low_discrepancy_seq, output_shape)
  
imports: import tensorflow.compat.v2
  from tf_quant_finance.math.random_ops import halton
  from tf_quant_finance.math.random_ops import sobol
  from tf_quant_finance.math.random_ops.multivariate_normal import RandomType
label_desc: Use image node_id 2 for calling a global function with example usage: _quasi_uniform(dim, sample_shape, random_type, dtype, seed) and returns: tf