code: def min_discrepancy_of_true_cdfs_detectable_by_dkwm_two_sample(
      n1, n2, false_fail_rate, false_pass_rate, name=None
  ):
      """Returns the minimum CDF discrepancy that a two-sample DKWM test can detect.
  
      DKWM is the [Dvoretzky-Kiefer-Wolfowitz-Massart inequality]
      (https://en.wikipedia.org/wiki/CDF-based_nonparametric_confidence_interval).
  
      Note that `false_fail_rate` is a total false failure rate for all
      the tests in the batch.  As such, if the batch is nontrivial, each
      member will demand more samples.  The `false_pass_rate` is also
      interpreted as a total, but is treated asymmetrically: If each test
      in the batch detects its corresponding discrepancy with probability
      at least `1 - false_pass_rate`, then running all those tests and
      failing if any one fails will jointly detect all those discrepancies
      with the same `false_pass_rate`.
  
      Args:
        n1: `Tensor` of numbers of samples to be drawn from the distributions A.
        n2: `Tensor` of numbers of samples to be drawn from the distributions B.
        false_fail_rate: *Scalar* floating-point `Tensor` admissible total
          rate of false failures.
        false_pass_rate: *Scalar* floating-point `Tensor` admissible rate
          of false passes.
        name: A name for this operation (optional).
  
      Returns:
        discr: `Tensor` of lower bounds on the K-S distances between true
           CDFs detectable by a DKWM-based test.
  
      For each batch member `i`, of `K` total, drawing `n1[i]` samples from scalar
      distribution A and `n2[i]` samples from scalar distribution B is enough to
      detect a K-S distance in CDFs of size `discr[i]` or more.  Specifically, we
      guarantee that (a) if their true CDFs are the same, then
      `assert_true_cdf_equal_by_dkwm_two_sample` will fail with probability at most
      `false_fail_rate / K` (which amounts to `false_fail_rate` if applied to the
      whole batch at once), and (b) if their true CDFs differ by at least
      `discr[i]`, `assert_true_cdf_equal_by_dkwm_two_sample` will pass with
      probability at most `false_pass_rate`.
  
      The detectable discrepancy scales as
  
      - `O(1 / sqrt(n[i]))`,
      - `O(-log(false_fail_rate/K))`, and
      - `O(-log(false_pass_rate))`.
      """
      with tf.name_scope(
          name
          or "min_discrepancy_of_true_cdfs_detectable_by_dkwm_two_sample"
      ):
          dtype = dtype_util.common_dtype(
              [n1, n2, false_fail_rate, false_pass_rate], tf.float32
          )
          n1 = tf.convert_to_tensor(value=n1, name="n1", dtype=dtype)
          n2 = tf.convert_to_tensor(value=n2, name="n2", dtype=dtype)
          false_fail_rate = tf.convert_to_tensor(
              value=false_fail_rate, name="false_fail_rate", dtype=dtype
          )
          false_pass_rate = tf.convert_to_tensor(
              value=false_pass_rate, name="false_pass_rate", dtype=dtype
          )
          # To fail to detect a discrepancy with the two-sample test, the given
          # samples must be close enough that they could have come from the same true
          # CDF.  That is, each must be close enough to a common CDF for the
          # one-sample test to be able to fail to detect the discrepancy.
          d1 = min_discrepancy_of_true_cdfs_detectable_by_dkwm(
              n1, false_fail_rate / 2.0, false_pass_rate / 2.0
          )
          d2 = min_discrepancy_of_true_cdfs_detectable_by_dkwm(
              n2, false_fail_rate / 2.0, false_pass_rate / 2.0
          )
          return d1 + d2
  
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 11 for calling a global function with example usage: min_discrepancy_of_true_cdfs_detectable_by_dkwm_two_sample(n1, n2, false_fail_rate, false_pass_rate, name) and returns: unknown