code: def _called_with_wrong_args(f):
      """Check whether calling a function raised a ``TypeError`` because
      the call failed or because something in the factory raised the
      error.
  
      :param f: The function that was called.
      :return: ``True`` if the call failed.
      """
      tb = sys.exc_info()[2]
  
      try:
          while tb is not None:
              if tb.tb_frame.f_code is f.__code__:
                  # In the function, it was called successfully.
                  return False
  
              tb = tb.tb_next
  
          # Didn't reach the function.
          return True
      finally:
          # Delete tb to break a circular reference.
          # https://docs.python.org/2/library/sys.html#sys.exc_info
          del tb
  
imports: from __future__ import annotations
  import ast
  import importlib.metadata
  import inspect
  import os
  import platform
  import re
  import sys
  import traceback
  import typing
  from functools import update_wrapper
  from operator import itemgetter
  import click
  from click.core import ParameterSource
  from werkzeug import run_simple
  from werkzeug.serving import is_running_from_reloader
  from werkzeug.utils import import_string
  from .globals import current_app
  from .helpers import get_debug_flag
  from .helpers import get_load_dotenv
label_desc: Use image node_id 2 for calling a global function with example usage: _called_with_wrong_args(f) and returns: True, False