class_docstr: Converts string into MongoQuery
code: def process(self, node):
      if isinstance(node, py_ast.Call):
          previous_call = None
  
          args = []
          for node2 in node.args:
              args.append(self.process(node2))
  
          # check functions
          if isinstance(node.func, py_ast.Name):
              # it is just name
              func = node.func.id
  
              # special functions:
              if func == "ISODate":
                  return dateutil.parser.isoparse(args[0])
              if func == "ObjectId":
                  return ObjectId(args[0])
          elif isinstance(node.func, py_ast.Attribute):
              # it can be an attribute or pipeline
              previous_call, func = self.process_func_name(node.func)
          else:
              raise NotImplementedError(
                  f"Unknown function type: {node.func}"
              )
  
          call = [{"method": func, "args": args}]
          if previous_call is not None:
              call = previous_call + call
  
          return call
  
      if isinstance(node, py_ast.List):
          elements = []
          for node2 in node.elts:
              elements.append(self.process(node2))
          return elements
  
      if isinstance(node, py_ast.Dict):
          keys = []
          for node2 in node.keys:
              if isinstance(node2, py_ast.Constant):
                  value = node2.value
              elif isinstance(node2, py_ast.Str):  # py37
                  value = node2.s
              else:
                  raise NotImplementedError(f"Unknown dict key {node2}")
  
              keys.append(value)
  
          values = []
          for node2 in node.values:
              values.append(self.process(node2))
  
          return dict(zip(keys, values))
  
      if isinstance(node, py_ast.Name):
          # special attributes
          name = node.id
          if name == "true":
              return True
          elif name == "false":
              return False
          elif name == "null":
              return None
  
      if isinstance(node, py_ast.Constant):
          return node.value
  
      # ---- python 3.7 objects -----
      if isinstance(node, py_ast.Str):
          return node.s
  
      if isinstance(node, py_ast.Num):
          return node.n
  
      # -----------------------------
  
      if isinstance(node, py_ast.UnaryOp):
          if isinstance(node.op, py_ast.USub):
              value = self.process(node.operand)
              return -value
  
      raise NotImplementedError(f"Unknown node {node}")
  
imports: import ast
  import dateutil.parser
  from bson import ObjectId
  from .mongodb_query import MongoQuery
label_desc: Use image node_id 2 for calling the MongodbParser obj's underlying member method code with example usage: obj.process(node) and returns: call, elements, dict, node, node, node, True, unknown, dateutil, ObjectId, False, None