def url_for(self, resource, **values):
endpoint = resource.endpoint<EOL>if self.blueprint:<EOL><INDENT>endpoint = '<STR_LIT>'.format(self.blueprint.name, endpoint)<EOL><DEDENT>return url_for(endpoint, **values)<EOL>
Generates a URL to the given resource.

        Works like :func:`flask.url_for`.