code: def _update_runs(
      db,
      dataset_dict,
      runs_field,
      config_match,
      config_updates,
      results_updates,
  ):
      runs = dataset_dict.get(runs_field, {})
  
      for run_id in runs.values():
          try:
              run_dict = db.runs.find_one({"_id": run_id})
          except:
              continue
  
          config = run_dict.get("config", {})
          if config and all(
              config.get(k, None) == v for k, v in config_match.items()
          ):
              # Update RunConfig
              config.update(**config_updates)
  
              # Update RunResults
              results_id = run_dict.get("results", None)
              if results_id is not None:
                  try:
                      run_dict["results"] = _update_run_results(
                          db, results_id, results_updates
                      )
                  except:
                      pass
  
              db.runs.replace_one({"_id": run_id}, run_dict)
  
imports: from bson import json_util
  import gridfs
label_desc: Use image node_id 3 for calling a global function with example usage: _update_runs(db, dataset_dict, runs_field, config_match, config_updates, results_updates) without return types