code: def mock_request_state():
      """Avoid requests to the api."""
      with mock.patch(
          "lightning.app.utilities.state.AppState._request_state",
          _request_state,
      ):
          yield
  
file_path: pytorch-lightning/tests/tests_app/frontend/conftest.py
imports: from unittest import mock
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: mock_request_state() without return types