<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def configure_discover(self, ns, definition):
 """ Register a swagger endpoint for a set of operations. """

        @self.add_route(ns.singleton_path, Operation.Discover, ns)
        def discover():
            swagger = build_swagger(self.graph, ns, self.find_matching_endpoints(ns))
            g.hide_body = True
            return make_response(swagger)