<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_perfect_consonant(note1, note2, include_fourths=True):
 """Return True if the interval is a perfect consonant one. Perfect consonances are either unisons, perfect fourths or fifths, or octaves (which is the same as a unison in this model). Perfect fourths are usually included as well, but are considered dissonant when used contrapuntal, which is why you can exclude them. """

    dhalf = measure(note1, note2)
    return dhalf in [0, 7] or include_fourths and dhalf == 5