code: def add_config(self, config, config_filename):
          
          content_types = config['content-types']
          comment_groups = config['comment-groups']
  
          self._comment_groups.update(comment_groups)
          self._content_types.update(content_types)
  
          for content_type, patterns in content_types.iteritems():
              if not patterns:
                  raise ValueError('''error: config parse error: \
  %s: Missing pattern for content type - `%s`"''' % (config_file, content_type))
              for pattern in patterns:
                  first_character = pattern[0]
                  last_character = pattern[-1]
                  if first_character == '.':
                      # Extension map.
                      pattern = extension_case_transform_func(pattern)
                      self._extension_map[pattern] = content_type
                  elif first_character == '/' and last_character == '/':
                      # Regular expression map.
                      self._regexp_map[re.compile(pattern[1:-1])] = content_type
                  else:
                      # Filename map.
                      self._filename_map[pattern] = content_type
docs: Updates the content types database with the given configuration.
  
          :param config:
              The configuration dictionary.
          :param config_filename:
              The path of the configuration file.