def mask_password(message, secret="***"):
    message = six.text_type(message)

    # NOTE(ldbragst): Check to see if anything in message contains any key
    # specified in _SANITIZE_KEYS, if not then just return the message since
    # we don't have to mask any passwords.
    if not any(key in message for key in _SANITIZE_KEYS):
        return message

    substitute = r'\g<1>' + secret + r'\g<2>'
    for pattern in _SANITIZE_PATTERNS_2:
        message = re.sub(pattern, substitute, message)

    substitute = r'\g<1>' + secret
    for pattern in _SANITIZE_PATTERNS_1:
        message = re.sub(pattern, substitute, message)

    return message
Get the fraction of the variance explained by the first frequency of a
dataset/ETHPy150Open openstack/python-rackclient/rackclient/openstack/common/strutils.py/mask_password--crossover with--dataset/ETHPy150Open cesium-ml/cesium/cesium/science_features/lomb_scargle.py/get_lomb_varrat