code: def convert_to_intervals(cuts):  # pragma: no cover
      cuts = np.array(cuts, dtype=np.float64)
  
      if np.isnan(cuts).any():
          raise Exception("cuts cannot contain nan")
  
      if np.isinf(cuts).any():
          raise Exception("cuts cannot contain infinity")
  
      smaller = np.insert(cuts, 0, -np.inf)
      larger = np.append(cuts, np.inf)
      intervals = list(zip(smaller, larger))
  
      if any(x[1] <= x[0] for x in intervals):
          raise Exception("cuts must contain increasing values")
  
      return intervals
  
imports: from math import ceil, isnan, isinf, exp, log
  from ...utils._native import Native
  from ._tensor import restore_missing_value_zeros
  import numpy
  import warnings
  from itertools import islice
  import logging
label_desc: Use image node_id 11 for calling a global function with example usage: convert_to_intervals(cuts) and returns: intervals