code: def clean_noqa(ex):
      assert isinstance(ex, str)
      # noqa is required to ignore lint, so we just remove it.
      ex = re.sub(" # noqa", "", ex)
      return ex
  
file_path: ray/python/ray/tests/test_traceback.py
imports: import re
  import sys
  import threading
  import pytest
  import ray
  from ray.exceptions import RayTaskError, RayActorError
label_desc: Use image node_id 2 for calling a global function with example usage: clean_noqa(ex) and returns: ex