code: def parse_swag_config_options(config):
      
      options = {}
      for key, val in config.items():
          if key.startswith('swag.backend.'):
              options[key[12:]] = val
          if key.startswith('swag.'):
              options[key[5:]] = val
  
      if options.get('type') == 's3':
          return S3OptionsSchema(strict=True).load(options).data
      elif options.get('type') == 'dynamodb':
          return DynamoDBOptionsSchema(strict=True).load(options).data
      else:
          return FileOptionsSchema(strict=True).load(options).data
docs: Ensures that options passed to the backend are valid.