code: def thresholds_calc(probs):
      """
      Calculate thresholds from probabilities vector.
  
      :param probs: probabilities
      :type probs: list or numpy array
      :return: thresholds as list
      """
      thresholds = numpy.ravel(probs)
      thresholds = sorted(set(thresholds))
      return thresholds
  
imports: from __future__ import division
  import sys
  import math
  import numpy
  import re
  from .pycm_param import *
  from .pycm_error import pycmMatrixError
  from warnings import warn
  from functools import wraps
label_desc: Use image node_id 31 for calling a global function with example usage: thresholds_calc(probs) and returns: thresholds