<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_metadata(self, key: str, value: str):
 """ Add a new metadata to the message Args: key (str):
 name of the metadata value (str):
 value of the metadata """

        if not isinstance(key, str) or not isinstance(value, str):
            raise TypeError("'key' and 'value' of metadata MUST be strings")
        self.metadata[key] = value