code: def mock_api_handled_group():
      @group(cls=_ApiExceptionHandler)
      def g():
          pass
  
      return g
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_exceptions.py
imports: from json import dumps
  from unittest.mock import MagicMock
  import pytest
  from click import ClickException, group
  from click.testing import CliRunner
  from lightning.app.utilities.exceptions import _ApiExceptionHandler
  from lightning_cloud.openapi.rest import ApiException
  from urllib3 import HTTPResponse
label_desc: Use image node_id 1 for calling a global function with example usage: mock_api_handled_group() and returns: g