code: def delete_patches_if_need(func):
      if hasattr(func, "patchings"):
          if AVOID_CLEARING_MOCK_PATCHES:
              func.patchings[:] = [
                  DummyPatchTarget.create_dummy_patch()
              ]
          else:
              func.patchings[:] = []
  
imports: import re
  import sys
  import inspect
  import warnings
  from typing import Iterable
  from functools import wraps
  from types import MethodType
  from collections import namedtuple
  from unittest import TestCase
label_desc: Use image node_id 5 for calling a global function with example usage: delete_patches_if_need(func) without return types