<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate(self, name: str, **kwargs: Dict[str, str]) -> str: """ generate url for named url pattern with kwargs """

        template = self.patterns[name]
        return template.substitute(kwargs)