<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mask_dict_password(dictionary, secret='***'):
 """Replace passwords with a secret in a dictionary."""

    d = dictionary.copy()
    for k in d:
        if 'password' in k:
            d[k] = secret
    return d