<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def AddContext(self, context_string, description=None):
 """Adds a context string to the global configuration. The context conveys information about the caller of the config system and allows the configuration to have specialized results for different callers. Note that the configuration file may specify conflicting options for different contexts. In this case, later specified contexts (i.e. the later AddContext() calls) will trump the earlier specified contexts. This allows specialized contexts to be specified on the command line which override normal operating options. Args: context_string: A string which describes the global program. description: A description as to when this context applies. Raises: InvalidContextError: An undefined context was specified. """

    if context_string not in self.context:
      if context_string not in self.valid_contexts:
        raise InvalidContextError(
            "Invalid context specified: %s" % context_string)

      self.context.append(context_string)
      self.context_descriptions[context_string] = description

    self.FlushCache()