def METHOD_NAME(self, render_passes, current_instances):
    if not render_passes:
        return
    # Render passes must have available render layers so we look for render
    #   layers first
    # - '_convert_render_layers' must be called before this method
    render_layers_by_group_id = {}
    for instance in current_instances:
        if instance.get("creator_identifier") == "render.layer":
            group_id = instance["creator_attributes"]["group_id"]
            render_layers_by_group_id[group_id] = instance
    for render_pass in render_passes:
        group_id = render_pass.pop("group_id")
        render_layer = render_layers_by_group_id.get(group_id)
        if not render_layer:
            render_pass["keep"] = False
            continue
        render_pass["creator_identifier"] = "render.pass"
        render_pass["instance_id"] = render_pass.pop("uuid")
        render_pass["family"] = "render"
        render_pass["creator_attributes"] = {
            "render_layer_instance_id": render_layer["instance_id"]
        }
        render_pass["variant"] = render_pass.pop("pass")
        render_pass.pop("renderlayer")