class_docstr: Datasource for reading from and writing to MongoDB.
class_docstr_tok: ["Datasource","for","reading","from","and","writing","to","MongoDB","."]
code: def _get_match_query(self, pipeline: List[Dict]) -> Dict:
      if len(pipeline) == 0 or "$match" not in pipeline[0]:
          return {}
      return pipeline[0]["$match"]
  
file_path: ray/python/ray/data/datasource/mongo_datasource.py
imports: import logging
  from typing import TYPE_CHECKING, Dict, List, Optional
  from ray.data.block import Block, BlockMetadata
  from ray.data.datasource.datasource import Datasource, ReadTask
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 3 for calling the MongoDatasource obj's underlying member method code with example usage: obj._get_match_query(pipeline) and returns: pipeline, dict