from tensorflow.python.ops import math_ops

      `predictions`, or if either `metrics_collections` or `updates_collections`
      are not a list or tuple.
  """
  top_k_idx = math_ops.to_int64(top_k_idx)
  weights = _mask_weights(ignore_mask, weights)
  tp, tp_update = _streaming_sparse_true_positive_at_k(
