code: def _build_match_histogram(
      x: dict, match_hist_unit: mz.preprocessors.units.MatchingHistogram
  ) -> np.ndarray:
      """
      Generate the matching hisogram for input.
  
      :param x: The input `dict`.
      :param match_hist_unit: The histogram unit :class:`MatchingHistogramUnit`.
      :return: The matching histogram.
      """
      match_hist = []
      text_left = x["text_left"].tolist()
      text_right = _trunc_text(
          x["text_right"].tolist(), x["length_right"].tolist()
      )
      for pair in zip(text_left, text_right):
          match_hist.append(match_hist_unit.transform(list(pair)))
      return np.asarray(match_hist)
  
file_path: MatchZoo/matchzoo/data_generator/callbacks/histogram.py
imports: import numpy
  import matchzoo
  from matchzoo.data_generator.callbacks import Callback
label_desc: Use image node_id 2 for calling a global function with example usage: _build_match_histogram(x, match_hist_unit) and returns: np