code: def _accuracy(cm: _ConfusionMatrix) -> _NumbersT:
      """Accuracy, only meaningful for samplewise ConfusionMatrixAtK."""
      return (cm.tp > 0).astype(int)
  
imports: from collections.abc import Iterable, Sequence
  import dataclasses
  import enum
  import itertools
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
label_desc: Use image node_id 5 for calling a global function with example usage: _accuracy(cm) and returns: unknown