def METHOD_NAME(message):
    """Decode pubsub message data.
    Args:
        message: dict, data that needs to be decoded.
    """
    message['data'] = json.loads(base64.b64decode(message['data']))
    metadata = message['attributes']
    message['attributes'] = {k: json.loads(v) for k, v in metadata.items()}