code: def mask_dict_password(dictionary, secret='***'):
      
      d = dictionary.copy()
      for k in d:
          if 'password' in k:
              d[k] = secret
      return d
docs: Replace passwords with a secret in a dictionary.