class_docstr: QueryGenerator is a helper object to write filters for runs.
class_docstr_tok: ["QueryGenerator","is","a","helper","object","to","write","filters","for","runs","."]
code: def _to_mongo_individual(self, filter):
      if filter["key"]["name"] == "":
          return None
  
      if (
          filter.get("value") is None
          and filter["op"] != "="
          and filter["op"] != "!="
      ):
          return None
  
      if filter.get("disabled") is not None and filter["disabled"]:
          return None
  
      if filter["key"]["section"] == "tags":
          if filter["op"] == "IN":
              return {"tags": {"$in": filter["value"]}}
          if filter["value"] is False:
              return {
                  "$or": [
                      {"tags": None},
                      {"tags": {"$ne": filter["key"]["name"]}},
                  ]
              }
          else:
              return {"tags": filter["key"]["name"]}
      path = self.key_to_server_path(filter["key"])
      if path is None:
          return path
      return {
          path: self._to_mongo_op_value(filter["op"], filter["value"])
      }
  
file_path: wandb/wandb/apis/public/query_generator.py
label_desc: Use image node_id 10 for calling the QueryGenerator obj's underlying member method code with example usage: obj._to_mongo_individual(filter) and returns: dict, None, None, None, path, dict, dict, dict