code: def ignore_exception_with_warning(message: str) -> None:
      """
      After catching a tolerable exception E1 (e.g. when Model.forward() fails during
      profiling with try-catch, it'll be helpful to log the exception for future
      investigation. But printing the error stack trace, as is, could be confusing
      when an uncaught (non-tolerable) exception "E2" raises down the road. Then, the log
      will contain two stack traces for E1, E2. When looking for errors in logs, users
      should look for E2, but they may find E1.
  
      This function appends "(WARNING)" at the end of all lines of the E1 traceback, so
      that the user can distinguish E1 from uncaught exception E2.
  
      Args:
          message: Extra explanation and context for debugging. (Note: the exception obj
      will be automatically fetched from python. No need to pass it as an argument or as
      message)
      """
      warning(
          f"{message}:\n{traceback.format_exc()}".replace(
              "\n", "\n(WARNING)"
          )
      )
  
file_path: ml-cvnets/utils/logger.py
imports: import os
  import sys
  import time
  import traceback
  from typing import Optional, Union
label_desc: Use image node_id 6 for calling a global function with example usage: ignore_exception_with_warning(message) without return types