code: def add_step(self, step):
      # step = {
      #     'method': 'sort',
      #     'args': [{c: 3}]
      # }
  
      if (
          "method" not in step
          or "args" not in step
          or not isinstance(step["args"], list)
      ):
          raise AttributeError(f"Wrong step {step}")
  
      self.pipeline.append(step)
  
file_path: mindsdb/mindsdb/api/mongo/utilities/mongodb_query.py
imports: import datetime
  from json import JSONEncoder
  from bson import ObjectId
label_desc: Use image node_id 2 for calling the MongoQuery obj's underlying member method code with example usage: obj.add_step(step) without return types