code: def chrom_precision(
      target: np.ndarray,
      prediction: np.ndarray,
  ) -> Dict[str, float]:
      """Compute precision.
  
      Args:
        target: Numpy array of targets of shape (n_samples, n_classes).
        prediction: Numpy array of model predictions of shape (n_samples,
          n_classes). Here also we assume the n_classes is equal to 2.
  
      Returns:
        Precision score.
      """
      target = np.argmax(target, axis=-1)
      prediction = np.argmax(prediction, axis=-1)
      return {
          "chrom_precision": sklearn.metrics.precision_score(
              target, prediction
          )
      }
  
file_path: scenic/scenic/projects/tasseo/train_utils.py
imports: from typing import Any, Dict, List, Optional
  from absl import logging
  import numpy
  import sklearn.metrics
label_desc: Use image node_id 6 for calling a global function with example usage: chrom_precision(target, prediction) and returns: dict