def _calc_map_expectation_success(self, success_count, nonnull_count, mostly):
    'Calculate success and percent_success for column_map_expectations\n\n        Args:\n            success_count (int):                 The number of successful values in the column\n            nonnull_count (int):                 The number of nonnull values in the column\n            mostly (float or None):                 A value between 0 and 1 (or None), indicating the fraction of successes required to pass the                 expectation as a whole. If mostly=None, then all values must succeed in order for the expectation as                 a whole to succeed.\n\n        Returns:\n            success (boolean), percent_success (float)\n        '
    if isinstance(success_count, decimal.Decimal):
        raise ValueError('success_count must not be a decimal; check your db configuration')
    if isinstance(nonnull_count, decimal.Decimal):
        raise ValueError('nonnull_count must not be a decimal; check your db configuration')
    if (nonnull_count > 0):
        percent_success = (success_count / nonnull_count)
        if (mostly is not None):
            success = bool((percent_success >= mostly))
        else:
            success = bool(((nonnull_count - success_count) == 0))
    else:
        success = True
        percent_success = None
    return (success, percent_success)
Calculate success and percent_success for column_map_expectations

Args:
    success_count (int):                 The number of successful values in the column
    nonnull_count (int):                 The number of nonnull values in the column
    mostly (float or None):                 A value between 0 and 1 (or None), indicating the fraction of successes required to pass the                 expectation as a whole. If mostly=None, then all values must succeed in order for the expectation as                 a whole to succeed.

Returns:
    success (boolean), percent_success (float)
def _calc_map_expectation_success(self, success_count, nonnull_count, mostly):
    'Calculate success and percent_success for column_map_expectations\n\n        Args:\n            success_count (int):                 The number of successful values in the column\n            nonnull_count (int):                 The number of nonnull values in the column\n            mostly (float or None):                 A value between 0 and 1 (or None), indicating the fraction of successes required to pass the                 expectation as a whole. If mostly=None, then all values must succeed in order for the expectation as                 a whole to succeed.\n\n        Returns:\n            success (boolean), percent_success (float)\n        '
    if isinstance(success_count, decimal.Decimal):
        raise ValueError('success_count must not be a decimal; check your db configuration')
    if isinstance(nonnull_count, decimal.Decimal):
        raise ValueError('nonnull_count must not be a decimal; check your db configuration')
    if (nonnull_count > 0):
        percent_success = (success_count / nonnull_count)
        if (mostly is not None):
            success = bool((percent_success >= mostly))
        else:
            success = bool(((nonnull_count - success_count) == 0))
    else:
        success = True
        percent_success = None
    return (success, percent_success)