def METHOD_NAME(
    cls, channels_ids: Iterable[str], field_name: str, errors: ErrorType, error_code
):
    duplicates = get_duplicated_values(channels_ids)
    if duplicates:
        errors[field_name].append(
            ValidationError(
                "Duplicated channel ID.",
                code=error_code,
                params={"channels": duplicates},
            )
        )