code: def update_individual_test_results(
      collection,
      id,
      submod,
      backend,
      test,
      result,
      backend_version=None,
      frontend_version=None,
  ):
      key = f"{submod}.{backend}"
      if backend_version is not None:
          backend_version = backend_version.replace(".", "_")
          key += f".{backend_version}"
      if frontend_version is not None:
          frontend_version = frontend_version.replace(".", "_")
          key += f".{frontend_version}"
      key += f".{test}"
      collection.update_one(
          {"_id": id},
          {"$set": {key: result}},
          upsert=True,
      )
  
file_path: ivy/scripts/run_tests/array_api_run_tests.py
imports: import os
  import subprocess
  import sys
  from pymongo import MongoClient
label_desc: Use image node_id 3 for calling a global function with example usage: update_individual_test_results(collection, id, submod, backend, test, result, backend_version, frontend_version) without return types