code: def _update_run_results(db, results_id, updates):
      fs = gridfs.GridFS(db)
  
      # Load run results
      f = fs.get(results_id)
      run_results_dict = json_util.loads(f.read().decode())
  
      # Update results
      run_results_dict.update(**updates)
  
      # Write updates run results
      results_bytes = json_util.dumps(run_results_dict).encode()
      new_results_id = fs.put(
          results_bytes, content_type="application/json"
      )
  
      try:
          # Delete old run results
          fs.delete(results_id)
      except:
          pass
  
      return new_results_id
  
imports: from bson import json_util
  import gridfs
label_desc: Use image node_id 4 for calling a global function with example usage: _update_run_results(db, results_id, updates) and returns: new_results_id