def METHOD_NAME(self, predictions, references):
    preds = []
    refs = []
    preds_by_lang = {}
    refs_by_lang = {}
    for prediction, reference in zip(predictions,references):
        preds.append(prediction['prediction'])
        refs.append(reference['label'])
        if 'language' not in reference:
            language = 'english'
        else:
            language = reference['language']
        if language not in preds_by_lang:
            preds_by_lang[language] = []
            refs_by_lang[language] = []
        preds_by_lang[language].append(prediction['prediction'])
        refs_by_lang[language].append(reference['label'])
    scores = {}
    print("labels")
    print(list(set(refs)))
    scores.update(prf(preds, refs, list(set(refs)), 'all'))
    for language in preds_by_lang:
        scores.update(prf(preds_by_lang[language], refs_by_lang[language], list(set(refs)), language))
    return score