docs: def guess_lexer_using_modeline(text):
      """Guess lexer for given text using Vim modeline.
  
      Returns a tuple of (lexer, accuracy).
      """
  
      lexer, accuracy = None, None
  
      file_type = None
      try:
          file_type = get_filetype_from_buffer(text)
      except:  # pragma: nocover
          log.traceback(logging.DEBUG)
  
      if file_type is not None:
          try:
              lexer = get_lexer_by_name(file_type)
          except ClassNotFound:
              log.traceback(logging.DEBUG)
  
      if lexer is not None:
          try:
              accuracy = lexer.analyse_text(text)
          except:  # pragma: nocover
              log.traceback(logging.DEBUG)
  
      return lexer, accuracy