This function takes a spellbook as input and returns an array of strings. Each string in the array is a result of applying the spell to itself. If a spell is deemed to be awesome, then it will be added to the result array and returned.
def sourcery(spellbook):
result = []
for spell in spellbook:
if spell.is_awesome:
result.append(spell)
return result