code: def _pair_deltas(seq, pars):
      '''Add up nearest-neighbor parameters for a given sequence.
  
      :param seq: DNA sequence for which to sum nearest neighbors
      :type seq: str
      :param pars: parameter set to use
      :type pars: dict
      :returns: nearest-neighbor delta_H and delta_S sums.
      :rtype: tuple of floats
  
      '''
      delta0 = 0
      delta1 = 0
      for i in range(len(seq) - 1):
          curchar = seq[i:i + 2]
          delta0 += pars['delta_h'][curchar]
          delta1 += pars['delta_s'][curchar]
      return delta0, deltaf _pair_deltas(seq, pars):
      '''Add up nearest-neighbor parameters for a given sequence.
  
      :param seq: DNA sequence for which to sum nearest neighbors
      :type seq: str
      :param pars: parameter set to use
      :type pars: dict
      :returns: nearest-neighbor delta_H and delta_S sums.
      :rtype: tuple of floats
  
      '''
      delta0 = 0
      delta1 = 0
      for i in range(len(seq) - 1):
          curchar = seq[i:i + 2]
          delta0 += pars['delta_h'][curchar]
          delta1 += pars['delta_s'][curchar]
      return delta0, delta1
docs: Add up nearest-neighbor parameters for a given sequence.
  
      :param seq: DNA sequence for which to sum nearest neighbors
      :type seq: str
      :param pars: parameter set to use
      :type pars: dict
      :returns: nearest-neighbor delta_H and delta_S sums.
      :rtype: tuple of floats