docstr: Removes 'text' from end of sql. Not case sensitive.
          
code: def cut_from_tail(self, text):
      """Removes 'text' from end of sql. Not case sensitive."""
      text_arr = text.split(" ")
  
      ending = CaselessKeyword(text_arr[0])
      for x in text_arr[1:]:
          ending = ending + CaselessKeyword(x)
      ending = ending + StringEnd()
  
      expr = (originalTextFor(SkipTo(ending)))("original") + (
          originalTextFor(ending)
      )("ending")
  
      try:
          r = expr.parseString(self._sql)
      except ParseException:
          return False
  
      self._sql = r.asDict()["original"].strip()
      return True
  
file_path: mindsdb/mindsdb/api/mysql/mysql_proxy/classes/sql_statement_parser.py
imports: import re
  from pyparsing import CaselessKeyword, originalTextFor, ParseException, ParserElement, QuotedString, ZeroOrMore, nestedExpr, restOfLine, StringEnd, Literal, SkipTo
  from mindsdb.api.mysql.mysql_proxy.utilities import exceptions
label_desc: Use image node_id 8 for calling the SqlStatementParser obj's underlying member method code with example usage: obj.cut_from_tail(text) and returns: True, False