def get_latest_labels_with_code_scheme(message, code_scheme):
    """
    Gets the labels assigned to this message under the given `code_scheme` (or a duplicate of this code scheme).

    Labels assigned under duplicate code schemes are normalised to have the primary code scheme id e.g. scheme_id
    'scheme-abc123-1' will be re-written to 'scheme-abc123'.

    :param message: Message to get the labels from.
    :type message: engagement_database.data_models.Message
    :param code_scheme: Code scheme to get the latest labels for.
    :type code_scheme: core_data_modules.data_models.CodeScheme
    :return: List of the relevant, normalised labels for the given code scheme.
    :rtype: list of core_data_modules.data_models.Label
    """
    latest_labels_with_code_scheme = []
    for label in message.get_latest_labels():
        if label.scheme_id.startswith(code_scheme.scheme_id):
            label.scheme_id = code_scheme.scheme_id
            latest_labels_with_code_scheme.append(label)
    return latest_labels_with_code_scheme