code: def crf_marginal_accuracy(y_true, y_pred):
      """Use time-wise marginal argmax as prediction.
      `y_pred` must be an output from CRF with `learn_mode="marginal"`.
      """
      crf, idx = y_pred._keras_history[:2]
      # X = crf._inbound_nodes[idx].input_tensors[0]
      # mask = crf._inbound_nodes[idx].input_masks[0]
      X = crf.get_input_at(idx)
      mask = crf.get_input_mask_at(idx)
      y_pred = crf.get_marginal_prob(X, mask)
      return _get_accuracy(y_true, y_pred, mask, crf.sparse_target)
  
imports: from __future__ import absolute_import, division
  from ....None import utils
  from ....imports import *
label_desc: Use image node_id 5 for calling a global function with example usage: crf_marginal_accuracy(y_true, y_pred) and returns: _get_accuracy