code: def _insert_job(self, query, request_env, mindsdb_env):
      for doc in query["documents"]:
          query_str = doc["query"]
          # try parse as mongo
          parser = MongodbParser()
          try:
              mql = parser.from_string(query_str)
  
              method = mql.pipeline[0]["method"]
              if method == "find":
                  args = mql.pipeline[0]["args"]
                  projection = None
                  if len(args) > 1:
                      projection = args[1]
                  query = {
                      "find": mql.collection,
                      "filter": args[0],
                      "projection": projection,
                  }
  
                  for step in mql.pipeline[1:]:
                      if step["method"] == "limit":
                          query["limit"] = step["args"][0]
                      if step["method"] == "skip":
                          query["skip"] = step["args"][0]
                      if step["method"] == "sort":
                          query["sort"] = step["args"][0]
                  # TODO implement group modifiers
                  ast_query = find_to_ast(
                      query, request_env.get("database", "mindsdb")
                  )
  
                  # to string
                  query_str = ast_query.to_string()
              elif method == "aggregate":
                  query = {
                      "aggregate": mql.collection,
                      "pipeline": mql.pipeline[0]["args"][0],
                  }
                  ast_query = aggregate_to_ast(
                      query, request_env.get("database", "mindsdb")
                  )
                  query_str = ast_query.to_string()
          except Exception:
              # keep query
              pass
  
          repeat_str = doc.get("schedule_str").lower().lstrip("every ")
  
          ast_query = CreateJob(
              name=Identifier(doc["name"]),
              start_str=doc.get("start_at"),
              end_str=doc.get("end_at"),
              query_str=query_str,
              repeat_str=repeat_str,
          )
          run_sql_command(request_env, ast_query)
  
file_path: mindsdb/mindsdb/api/mongo/responders/insert.py
imports: import pandas
  from mindsdb_sql.parser.ast import Constant, Identifier, Insert, OrderBy, TableColumn
  from mindsdb_sql.parser.dialects.mindsdb import CreateJob, CreateMLEngine, CreatePredictor, FinetunePredictor, RetrainPredictor
  import mindsdb.api.mongo.functions
  from mindsdb.api.mongo.classes import Responder
  from mindsdb.api.mongo.classes.query_sql import run_sql_command
  from mindsdb.api.mongo.responders.aggregate import aggregate_to_ast
  from mindsdb.api.mongo.responders.find import find_to_ast
  from mindsdb.api.mongo.utilities.mongodb_parser import MongodbParser
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.utilities import log
label_desc: Use image node_id 4 for calling the Responce obj's underlying member method code with example usage: obj._insert_job(query, request_env, mindsdb_env) without return types