code: def test_matchinghistogram_unit(hist_mode):
      embedding = np.array([[1.0, -1.0], [1.0, 2.0], [1.0, 3.0]])
      text_left = [0, 1]
      text_right = [1, 2]
      histogram = units.MatchingHistogram(3, embedding, True, hist_mode)
      out = histogram.transform([text_left, text_right])
      out = [[round(elem, 2) for elem in list_val] for list_val in out]
      if hist_mode == "CH":
          assert out == [[3.0, 1.0, 1.0], [1.0, 2.0, 2.0]]
      elif hist_mode == "NH":
          assert out == [[0.6, 0.2, 0.2], [0.2, 0.4, 0.4]]
      elif hist_mode == "LCH":
          assert out == [[1.1, 0.0, 0.0], [0.0, 0.69, 0.69]]
      else:
          assert False
  
imports: import pytest
  import numpy
  from matchzoo.preprocessors import units
  import matchzoo
  import tempfile
  import os
label_desc: Use image node_id 14 for calling a global function with example usage: test_matchinghistogram_unit(hist_mode) without return types