code: def is_stats_query(query):
      
      if not query:
          return False
  
      # remove all " enclosed strings
      nq = re.sub(r'"[^"]*"', '', query)
  
      # check if there's | .... select
      if re.findall(r'\|.*\bselect\b', nq, re.I|re.DOTALL):
          return True
  
      return False
docs: check if the query is a normal search or select query
      :param query:
      :return: