def _generate_routes(self, namespace):
<EOL>self.cur_namespace = namespace<EOL>if self.args.auth_type is not None:<EOL><INDENT>self.supported_auth_types = [auth_type.strip().lower() for auth_type in self.args.auth_type.split('<STR_LIT:U+002C>')]<EOL><DEDENT>check_route_name_conflict(namespace)<EOL>for route in namespace.routes:<EOL><INDENT>if self.supported_auth_types is None:<EOL><INDENT>self._generate_route_helper(namespace, route)<EOL>if route.attrs.get('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>self._generate_route_helper(namespace, route, True)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>route_auth_attr = None<EOL>if route.attrs is not None:<EOL><INDENT>route_auth_attr = route.attrs.get('<STR_LIT>')<EOL><DEDENT>if route_auth_attr is None:<EOL><INDENT>continue<EOL><DEDENT>route_auth_modes = [mode.strip().lower() for mode in route_auth_attr.split('<STR_LIT:U+002C>')]<EOL>for base_auth_type in self.supported_auth_types:<EOL><INDENT>if base_auth_type in route_auth_modes:<EOL><INDENT>self._generate_route_helper(namespace, route)<EOL>if route.attrs.get('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>self._generate_route_helper(namespace, route, True)<EOL><DEDENT>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Generates Python methods that correspond to routes in the namespace.