def METHOD_NAME(data):
    """Validate merge reports.
    :param data: dict with list of report ids
    :returns QuerySet DetailsReport
    """
    error = {"reports": []}
    if not isinstance(data, dict) or data.get("reports") is None:
        error.get("reports").append(_(messages.REPORT_MERGE_REQUIRED))
        raise ValidationError(error)
    report_ids = data.get("reports")
    if not isinstance(report_ids, list):
        error.get("reports").append(_(messages.REPORT_MERGE_NOT_LIST))
        raise ValidationError(error)
    report_id_count = len(report_ids)
    if report_id_count < 2:  # noqa: PLR2004
        error.get("reports").append(_(messages.REPORT_MERGE_TOO_SHORT))
        raise ValidationError(error)
    non_integer_values = [
        report_id for report_id in report_ids if not is_int(report_id)
    ]
    if bool(non_integer_values):
        error.get("reports").append(_(messages.REPORT_MERGE_NOT_INT))
        raise ValidationError(error)
    report_ids = [int(report_id) for report_id in report_ids]
    unique_id_count = len(set(report_ids))
    if unique_id_count != report_id_count:
        error.get("reports").append(_(messages.REPORT_MERGE_NOT_UNIQUE))
        raise ValidationError(error)
    reports = DetailsReport.objects.filter(pk__in=report_ids).order_by("-id")
    actual_report_ids = [report.id for report in reports]
    missing_reports = set(report_ids) - set(actual_report_ids)
    if bool(missing_reports):
        message = _(messages.REPORT_MERGE_NOT_FOUND) % (
            ", ".join([str(i) for i in missing_reports])
        )
        error.get("reports").append(message)
        raise ValidationError(error)
    return reports