def METHOD_NAME(runs):
    """
    Process `PipelineModel`s and construct a JSON that is returned from the endpoints
    that return merged chroots.
    Args:
        runs: Iterator over merged `PipelineModel`s.
    Returns:
        List of JSON objects where each represents pipelines run on single SRPM.
    """
    result = []
    for pipeline in runs:
        response_dict = {
            "merged_run_id": pipeline.merged_id,
            "srpm": None,
            "copr": [],
            "koji": [],
            "test_run": [],
            "propose_downstream": [],
            "pull_from_upstream": [],
        }
        if srpm_build := SRPMBuildModel.get_by_id(pipeline.srpm_build_id):
            response_dict["srpm"] = {
                "packit_id": srpm_build.id,
                "status": srpm_build.status,
            }
            response_dict["time_submitted"] = optional_timestamp(
                srpm_build.build_submitted_time
            )
            response_dict["trigger"] = get_project_info_from_build(srpm_build)
        for model_type, Model, packit_ids in (
            ("copr", CoprBuildGroupModel, pipeline.copr_build_group_id),
            ("koji", KojiBuildGroupModel, pipeline.koji_build_group_id),
            ("test_run", TFTTestRunGroupModel, pipeline.test_run_group_id),
        ):
            for packit_id in set(flatten_and_remove_none(packit_ids)):
                group_row = Model.get_by_id(packit_id)
                for row in group_row.grouped_targets:
                    if row.status == BuildStatus.waiting_for_srpm:
                        continue
                    response_dict[model_type].append(
                        {
                            "packit_id": row.id,
                            "target": row.target,
                            "status": row.status,
                        }
                    )
                    if "trigger" not in response_dict:
                        submitted_time = (
                            row.submitted_time
                            if isinstance(row, TFTTestRunTargetModel)
                            else row.build_submitted_time
                        )
                        response_dict["time_submitted"] = optional_timestamp(
                            submitted_time
                        )
                        response_dict["trigger"] = get_project_info_from_build(row)
        # handle propose-downstream and pull-from-upstream
        if sync_release := list(flatten_and_remove_none(pipeline.sync_release_run_id)):
            _add_sync_release(
                SyncReleaseModel.get_by_id(sync_release[0]),
                response_dict,
            )
        result.append(response_dict)
    return result