<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def parse_yaml(self, y):
        '''Parse a YAML speficication of a message sending object into this
        object.

        '''
        self._targets = []
        if 'targets' in y:
            for t in y['targets']:
                if 'waitTime' in t['condition']:
                    new_target = WaitTime()
                elif 'preceding' in t['condition']:
                    new_target = Preceding()
                else:
                    new_target = Condition()
                new_target.parse_yaml(t)
                self._targets.append(new_target)
        return self