def bind(self, flask_app, service, group=None):
if group not in self.services[service]:<EOL><INDENT>raise RuntimeError(<EOL>'<STR_LIT>'.format(<EOL>group, service)<EOL>)<EOL><DEDENT>for name, api in self.services[service][group].items():<EOL><INDENT>if api.view_fn is None:<EOL><INDENT>continue<EOL><DEDENT>if name not in flask_app.view_functions:<EOL><INDENT>flask_app.add_url_rule(<EOL>api.url, name, view_func=api.view_fn, **api.options)<EOL><DEDENT><DEDENT>
Bind the service API urls to a flask app.