Some plugins are meant to be both (web) server and twanager extensions.
If the plugin initialization needs to distinguish between these cases, the following check can be used:
def init(config):
if 'selector' in config:
# server
else:
# twanager