def min_discrepancy_of_true_cdfs_detectable_by_dkwm(<EOL>n, false_fail_rate, false_pass_rate, name=None):
with tf.compat.v1.name_scope(<EOL>name, '<STR_LIT>',<EOL>[n, false_fail_rate, false_pass_rate]):<EOL><INDENT>dtype = dtype_util.common_dtype(<EOL>[n, false_fail_rate, false_pass_rate], tf.float32)<EOL>n = tf.convert_to_tensor(value=n, name='<STR_LIT:n>', dtype=dtype)<EOL>false_fail_rate = tf.convert_to_tensor(<EOL>value=false_fail_rate, name='<STR_LIT>', dtype=dtype)<EOL>false_pass_rate = tf.convert_to_tensor(<EOL>value=false_pass_rate, name='<STR_LIT>', dtype=dtype)<EOL>sampling_envelope = _dkwm_cdf_envelope(n, false_pass_rate)<EOL>itemwise_false_fail_rate = _itemwise_error_rate(<EOL>total_rate=false_fail_rate, param_tensors=[n])<EOL>analysis_envelope = _dkwm_cdf_envelope(n, itemwise_false_fail_rate)<EOL>return sampling_envelope + analysis_envelope<EOL><DEDENT>
Returns the minimum CDF discrepancy that a DKWM-based 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:
      n: `Tensor` of numbers of samples to be drawn from the distributions
        of interest.
      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 `n[i]` samples from some
    scalar distribution is enough to detect a K-S distance in CDFs of size
    `discr[i]` or more.  Specifically, we guarantee that (a) if the true CDF is
    the expected CDF, then `assert_true_cdf_equal_by_dkwm` 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 the true CDF differs from
    the expected CDF by at least `discr[i]`, `assert_true_cdf_equal_by_dkwm` 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))`.