code: def true_mean_confidence_interval_by_dkwm(
      samples, low, high, error_rate=1e-6, name=None
  ):
      """Computes a confidence interval for the mean of a scalar distribution.
  
      In batch mode, computes confidence intervals for all distributions
      in the batch (which need not be identically distributed).
  
      Relies on the [Dvoretzky-Kiefer-Wolfowitz-Massart inequality]
      (https://en.wikipedia.org/wiki/CDF-based_nonparametric_confidence_interval).
  
      The probability (over the randomness of drawing the given samples)
      that any true mean is outside the corresponding returned interval is
      no more than the given `error_rate`.  The size of the intervals
      scale as
      `O(1 / sqrt(#samples))`, as `O(high - low)`, and as `O(-log(error_rate))`.
  
      Note that `error_rate` is a total error rate for all the confidence
      intervals in the batch.  As such, if the batch is nontrivial, the
      error rate is not broadcast but divided (evenly) among the batch
      members.
  
      Args:
        samples: Floating-point `Tensor` of samples from the distribution(s)
          of interest.  Entries are assumed IID across the 0th dimension.
          The other dimensions must broadcast with `low` and `high`.
          The support is bounded: `low <= samples <= high`.
        low: Floating-point `Tensor` of lower bounds on the distributions'
          supports.
        high: Floating-point `Tensor` of upper bounds on the distributions'
          supports.
        error_rate: *Scalar* floating-point `Tensor` admissible total rate
          of mistakes.
        name: A name for this operation (optional).
  
      Returns:
        low: A floating-point `Tensor` of stochastic lower bounds on the
          true means.
        high: A floating-point `Tensor` of stochastic upper bounds on the
          true means.
      """
      with tf.name_scope(
          name or "true_mean_confidence_interval_by_dkwm"
      ):
          dtype = dtype_util.common_dtype(
              [samples, low, high, error_rate], tf.float32
          )
          samples = tf.convert_to_tensor(
              value=samples, name="samples", dtype=dtype
          )
          low = tf.convert_to_tensor(value=low, name="low", dtype=dtype)
          high = tf.convert_to_tensor(
              value=high, name="high", dtype=dtype
          )
          error_rate = tf.convert_to_tensor(
              value=error_rate, name="error_rate", dtype=dtype
          )
          samples = _check_shape_dominates(samples, [low, high])
          tf.debugging.assert_scalar(error_rate)  # Static shape
          itemwise_error_rate = _itemwise_error_rate(
              total_rate=error_rate,
              param_tensors=[low, high],
              samples_tensor=samples,
          )
          n = tf.shape(samples)[0]
          envelope = _dkwm_cdf_envelope(n, itemwise_error_rate)
          min_mean = _minimum_mean(samples, envelope, low)
          max_mean = _maximum_mean(samples, envelope, high)
          return min_mean, max_mean
  
imports: import functools
  import itertools
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 17 for calling a global function with example usage: true_mean_confidence_interval_by_dkwm(samples, low, high, error_rate, name) and returns: min_mean,  max_mean