docstr: Computes POS score accuracy.
  :param pred, tensor or numpy, the prediction label id
  :param gold: tensor or numpy, the gold label id
  :param ignore_label_id: int, the ignore_label_id in gold will be ignored when calculate the metric
  :return: float, the computed accuracy
code: def __call__(self, pred, gold, ignore_label_id=0):
      r"""
      Computes POS score accuracy.
      :param pred, tensor or numpy, the prediction label id
      :param gold: tensor or numpy, the gold label id
      :param ignore_label_id: int, the ignore_label_id in gold will be ignored when calculate the metric
      :return: float, the computed accuracy
      """
      total = gold != ignore_label_id
      acc = (total & (pred == gold)).sum() / total.sum()
      return {"precision": acc}
  
file_path: textflint/textflint/input/model/metrics/metrics.py
imports: import torch
  import datasets
  from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
label_desc: Use image node_id 1 for calling the POSMetric obj's underlying member method code with example usage: obj.__call__(pred, gold, ignore_label_id) and returns: dict