code: def _cast(self):
          
  
          for configName, configDict in self.configs.items():
              if configDict['cast'] is not None:
                  configValue = getattr(self._config, configName)
                  if configValue is not None:
                      try:
                          self._setConfig(configName, configDict['cast'](configValue))
  
                      except:
                          raise InvalidConfigurationException("%s: %r" % (configName, configValue))
docs: Iterates through our parsed configuration options and cast any options with marked cast types.