def url(self, name, *, base=None, query=None, **match):
if base is None:<EOL><INDENT>base = self.service<EOL><DEDENT>for name in name.split('<STR_LIT:.>'):<EOL><INDENT>base = base[name]<EOL><DEDENT>pattern = self.__get_pattern(base.path)<EOL>url = pattern.format(**match)<EOL>if query is not None:<EOL><INDENT>url += '<STR_LIT:?>' + urlencode(query)<EOL><DEDENT>return url<EOL>
Construct an url for the given parameters.

        Parameters
        ----------
        name: str
            Nested middleware's name separated by dots.
        base: :class:`.Middleware`
            Base middleware to start searching from.
        query: dict
            Query string data.
        match: dict
            Path parameters.

        Returns
        -------
        str
            Constructed url.