def _matchPluginToPrefix(plugins, endpointType):
 endpointType = endpointType.lower()
 for plugin in plugins:
  if (_matchingString(plugin.prefix.lower(), endpointType) == endpointType):
   return plugin
 raise ValueError(("Unknown endpoint type: '%s'" % (endpointType,)))

def _matchPluginToPrefix ( plugins , endpointType ) : endpointType = endpointType . lower ( ) for plugin in plugins : if ( _matchingString ( plugin . prefix . lower ( ) , endpointType ) == endpointType ) : return plugin raise ValueError ( ( "Unknown endpoint type: '%s'" % ( endpointType , ) ) )
match plugin to prefix .