code: def print_middleware_tree(self, *, EOL=os.linesep, **kwargs):  # noqa pragma: no cover
          
  
          def mask_to_method_name(mask):
              if mask == HTTPMethod.ALL:
                  return 'ALL'
              methods = set(HTTPMethod) - {HTTPMethod.ALL}
              names = (method.name for method in methods if method.value & mask)
              return '+'.join(names)
  
          def path_to_str(path):
              if isinstance(path, str):
                  return path
              return path.pattern.replace('\\', '')
  
          def decend_into_tree(chain, level):
              lines_ = []
              for mw in chain:
                  info = (mask_to_method_name(mw.mask),
                          path_to_str(mw.path),
                          mw.func)
                  prefix = "│   " * level
                  lines_ += [prefix + "├── %s %s %s" % info]
                  if mw.is_subchain:
                      lines_ += decend_into_tree(mw.func, level + 1)
              if level:
                  lines_[-1] = lines_[-1].replace('├', '└')
              return lines_
  
          lines = [self.name]
          lines += decend_into_tree(self.middleware, 0)
          lines.append('┴')
          print(EOL.join(lines), **kwargs)
docs: Prints a unix-tree-like output of the structure of the web
          application to the file specified (stdout by default).
  
          Args:
              EOL (str): The character or string that ends the line.
              **kwargs: Arguments pass to the standard print function.
                  This allows specifying the file to write to and the
                  ability to flush output upon creation.