code: def add_global_metric(metric_name: str, metric_value: Any) -> None:
      """
      Adds stats that should be emitted with every metric by the current process.
      If the emit_metrics method specifies a metric with the same name, it will
      overwrite this value.
      """
      global_metrics[metric_name] = metric_value
  
file_path: pytorch/tools/stats/upload_metrics.py
imports: import datetime
  import inspect
  import os
  import time
  import uuid
  from decimal import Decimal
  from typing import Any, Dict
  from warnings import warn
label_desc: Use image node_id 1 for calling a global function with example usage: add_global_metric(metric_name, metric_value) without return types