code: def eigvals_to_frequencies(eigvals):
      r"""Convert an eigenvalue spectrum to frequency values, defined
      as the the set of positive, unique differences of the eigenvalues in the spectrum.
  
      Args:
          eigvals (tuple[int, float]): eigenvalue spectra
  
      Returns:
          tuple[int, float]: frequencies
  
      **Example**
  
      >>> eigvals = (-0.5, 0, 0, 0.5)
      >>> eigvals_to_frequencies(eigvals)
      (0.5, 1.0)
      """
      unique_eigvals = sorted(set(eigvals))
      return tuple(
          {j - i for i, j in itertools.combinations(unique_eigvals, 2)}
      )
  
imports: import functools
  import itertools
  import numbers
  import warnings
  import numpy
  import pennylane
  from pennylane.measurements import MeasurementProcess
  from pennylane.ops.functions import bind_new_parameters
  from pennylane.tape import QuantumScript
label_desc: Use image node_id 2 for calling a global function with example usage: eigvals_to_frequencies(eigvals) and returns: tuple