code: def parse_view(query):
      
  
      try:
          idx = query.lower().index('where')
          query = query[:idx]
      except ValueError:
          pass
  
      if not query.endswith(';'):
          query = query.strip()
          query += ';'
  
      result = _view_stmt.parseString(query)
  
      return View(result)
docs: Parses asql query to view object.
  
      Args:
          query (str): asql query
  
      Returns:
          View instance: parsed view.