class_docstr: Converts query mongo to AST format
class_docstr_tok: ["Converts","query","mongo","to","AST","format"]
code: def from_mongoqeury(self, query):
      # IS NOT USED YET AND NOT FINISHED
  
      collection = query.collection
  
      filter, projection = None, None
      sort, limit, skip = None, None, None
      for step in query.pipeline:
          if step["method"] == "find":
              filter = step["args"][0]
              if len(step) > 1:
                  projection = step["args"][1]
          elif step["method"] == "sort":
              sort = step["args"][0]
          elif step["method"] == "limit":
              limit = step["args"][0]
          elif step["method"] == "skip":
              skip = step["args"][0]
  
      return self.find(
          collection,
          filter=filter,
          sort=sort,
          projection=projection,
          limit=limit,
          skip=skip,
      )
  
file_path: mindsdb/mindsdb/api/mongo/utilities/mongodb_ast.py
imports: import re
  import ast
  import typing
  from mindsdb_sql.parser.ast import OrderBy, Identifier, Star, Select, Constant, BinaryOperation, Tuple, Latest
label_desc: Use image node_id 1 for calling the MongoToAst obj's underlying member method code with example usage: obj.from_mongoqeury(query) and returns: self