code: def test_accumulation_macro_bleu():
      bleu = Bleu(ngram=4, smooth="smooth2")
      bleu.update(([corpus.cand_1], [corpus.references_1]))
      bleu.update(([corpus.cand_2a], [corpus.references_2]))
      bleu.update(([corpus.cand_2b], [corpus.references_2]))
      bleu.update(([corpus.cand_3], [corpus.references_2]))
      value = bleu._sentence_bleu(corpus.references_1, corpus.cand_1)
      value += bleu._sentence_bleu(corpus.references_2, corpus.cand_2a)
      value += bleu._sentence_bleu(corpus.references_2, corpus.cand_2b)
      value += bleu._sentence_bleu(corpus.references_2, corpus.cand_3)
      assert bleu.compute() == value / 4
  
imports: import os
  import warnings
  from collections import Counter
  import pytest
  import torch
  from nltk.translate.bleu_score import corpus_bleu, sentence_bleu, SmoothingFunction
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics.nlp import Bleu
  from .None import CorpusForTest
label_desc: Use image node_id 11 for calling a global function with example usage: test_accumulation_macro_bleu() without return types