<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_messages(self, validation):
 """ Adds all the messages in the specified `Validation` object to this instance's messages array. Args: validation (Validation):
 An object containing the messages to add to this instance's messages. """

        if not isinstance(validation, Validation):
            raise TypeError("Argument must be of type Validation")

        self.messages.extend(validation.messages)