code: def _threat_score(tp_at_topks, k_list, y_true_len):
      cumsum_fn = y_true_len[:, np.newaxis] - tp_at_topks[:, k_list - 1]
      return tp_at_topks[:, k_list - 1] / (cumsum_fn + k_list)
  
imports: from collections.abc import Sequence
  import dataclasses
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
  from tensorflow_model_analysis.experimental.metrics.aggregates import _classification
label_desc: Use image node_id 7 for calling a global function with example usage: _threat_score(tp_at_topks, k_list, y_true_len) and returns: unknown