def METHOD_NAME(rjson):
    actions = {'PUSH_ARTIFACT': 'push', 'DELETE_ARTIFACT': 'delete', 'REPLICATION': 'replication'}
    action = actions[rjson['type']]
    if action == 'push' or action == 'delete':
        for event in rjson['event_data']['resources']:
            resource_url = event['resource_url']
            image = 'https://{}'.format(resource_url)
            yield (action, image)
    elif action == 'replication':
        replication = rjson['event_data']['replication']
        registry_dst = replication["dest_resource"]
        registry_src = replication["src_resource"]
        destination = '{}/{}'.format(registry_dst["endpoint"], registry_dst["namespace"])
        source = '{}/{}'.format(registry_src["endpoint"], registry_src["namespace"])
        try:
            artifact = rjson['event_data']['replication']['successful_artifact']
            for event in artifact:
                image_name = event['name_tag'].split(" ")[0]
            image = str(destination + '/' + image_name)
            yield (action, image)
        except Exception as e:
            print("The replicated artifact from {} already exists in {}".format(str(source), str(destination)))