def _hide_key(param, value):
    """Used to hide keys in the logging."""
    if not param.endswith('_key'):
        return value
    if len(value) > 16:
        return value[:3] + '...' + value[-3:]
    else:
        return '********'
