docs: def _get_tuple_from_route(route):
      """Return (pattern, handler_class, methods) tuple from ``route``
  
      :type route: tuple|tornado.web.URLSpec
      :rtype: tuple
      :raises TypeError: If ``route`` is not a tuple or URLSpec
      """
      if isinstance(route, tuple):
          assert len(route) >= 2
          pattern, handler_class = route[:2]
      elif isinstance(route, tornado.web.URLSpec):
          pattern, handler_class = route.regex.pattern, route.handler_class
      else:
          raise TypeError("Unknown route type '{}'"
                          .format(type(route).__name__))
  
      methods = []
      route_re = re.compile(pattern)
      route_params = set(list(route_re.groupindex.keys()) + ['self'])
      for http_method in HTTP_METHODS:
          method = getattr(handler_class, http_method, None)
          if method:
              method = extract_method(method)
              method_params = set(getattr(method, "__argspec_args",
                                          inspect.getargspec(method).args))
              if route_params.issubset(method_params) and \
                      method_params.issubset(route_params):
                  methods.append(http_method)
  
      return pattern, handler_class, methods