code: def _generate_routes(self, namespace):
          
  
          # Hack: needed for _docf()
          self.cur_namespace = namespace
          # list of auth_types supported in this base class.
          # this is passed with the new -w flag
          if self.args.auth_type is not None:
              self.supported_auth_types = [auth_type.strip().lower() for auth_type in self.args.auth_type.split(',')]
  
          check_route_name_conflict(namespace)
  
          for route in namespace.routes:
              # compatibility mode : included routes are passed by whitelist
              # actual auth attr inluded in the route is ignored in this mode.
              if self.supported_auth_types is None:
                  self._generate_route_helper(namespace, route)
                  if route.attrs.get('style') == 'download':
                      self._generate_route_helper(namespace, route, True)
              else:
                  route_auth_attr = None
                  if route.attrs is not None:
                      route_auth_attr = route.attrs.get('auth')
                  if route_auth_attr is None:
                      continue
                  route_auth_modes = [mode.strip().lower() for mode in route_auth_attr.split(',')]
                  for base_auth_type in self.supported_auth_types:
                      if base_auth_type in route_auth_modes:
                          self._generate_route_helper(namespace, route)
                          if route.attrs.get('style') == 'download':
                              self._generate_route_helper(namespace, route, True)
                          break
docs: Generates Python methods that correspond to routes in the namespace.