<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_ability(self, phase, ability):
 """Add the given ability to this Card under the given phase. Returns the length of the abilities for the given phase after the addition. """

        if phase not in self.abilities:
            self.abilities[phase] = []
        self.abilities[phase].append(ability)
        return len(self.abilities[phase])