original_docstring: Computes elements of cost that only pertain to a single chord.
docstring: Computes elements of cost that only pertain to a single chord.
docstring_tokens: Computes elements of cost that only pertain to a single chord .
code: def chordCost(key, chord):
      """Computes elements of cost that only pertain to a single chord."""
      cost = 0
      if chord.inversion() == 0:
          # Slightly prefer to double the root in a R.P. chord
          if chord.pitchClasses.count(chord.root().pitchClass) <= 1:
              cost += 1
      return cost
code_tokens: def chordCost ( key , chord ) : cost = 0 if chord . inversion ( ) == 0 : if chord . pitchClasses . count ( chord . root ( ) . pitchClass ) <= 1 : cost += 1 return cost
short_docstring: Computes elements of cost that only pertain to a single chord.
short_docstring_tokens: Computes elements of cost that only pertain to a single chord .
comment: """Computes elements of cost that only pertain to a single chord."""$SEP$# Slightly prefer to double the root in a R.P. chord