def METHOD_NAME(self, context):
    comp = context.data.get("currentComp")
    comp_frame_format_prefs = comp.GetPrefs("Comp.FrameFormat")
    aspect_x = comp_frame_format_prefs["AspectX"]
    aspect_y = comp_frame_format_prefs["AspectY"]
    instances = []
    instances_to_remove = []
    current_file = context.data["currentFile"]
    version = context.data["version"]
    project_entity = context.data["projectEntity"]
    for inst in context:
        if not inst.data.get("active", True):
            continue
        family = inst.data["family"]
        if family != "render":
            continue
        task_name = context.data["task"]
        tool = inst.data["transientData"]["tool"]
        instance_families = inst.data.get("families", [])
        subset_name = inst.data["subset"]
        instance = FusionRenderInstance(
            family="render",
            tool=tool,
            workfileComp=comp,
            families=instance_families,
            version=version,
            time="",
            source=current_file,
            label=inst.data["label"],
            subset=subset_name,
            asset=inst.data["asset"],
            task=task_name,
            attachTo=False,
            setMembers='',
            publish=True,
            name=subset_name,
            resolutionWidth=comp_frame_format_prefs.get("Width"),
            resolutionHeight=comp_frame_format_prefs.get("Height"),
            pixelAspect=aspect_x / aspect_y,
            tileRendering=False,
            tilesX=0,
            tilesY=0,
            review="review" in instance_families,
            frameStart=inst.data["frameStart"],
            frameEnd=inst.data["frameEnd"],
            handleStart=inst.data["handleStart"],
            handleEnd=inst.data["handleEnd"],
            frameStartHandle=inst.data["frameStartHandle"],
            frameEndHandle=inst.data["frameEndHandle"],
            frameStep=1,
            fps=comp_frame_format_prefs.get("Rate"),
            app_version=comp.GetApp().Version,
            publish_attributes=inst.data.get("publish_attributes", {})
        )
        render_target = inst.data["creator_attributes"]["render_target"]
        # Add render target family
        render_target_family = f"render.{render_target}"
        if render_target_family not in instance.families:
            instance.families.append(render_target_family)
        # Add render target specific data
        if render_target in {"local", "frames"}:
            instance.projectEntity = project_entity
        if render_target == "farm":
            fam = "render.farm"
            if fam not in instance.families:
                instance.families.append(fam)
            instance.farm = True  # to skip integrate
            if "review" in instance.families:
                # to skip ExtractReview locally
                instance.families.remove("review")
        # add new instance to the list and remove the original
        # instance since it is not needed anymore
        instances.append(instance)
        instances_to_remove.append(inst)
    for instance in instances_to_remove:
        context.remove(instance)
    return instances