code: def test_is_context():
      _set_context("flow")
      assert _is_flow_context()
  
      _set_work_context()
      assert _is_work_context()
  
      _set_context(None)
      assert not _is_flow_context()
      assert not _is_work_context()
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_component.py
imports: import pytest
  from lightning.app.storage.path import Path
  from lightning.app.testing.helpers import EmptyFlow, EmptyWork
  from lightning.app.utilities.component import _context, _convert_paths_after_init, _get_context, _is_flow_context, _is_work_context, _set_context, _set_work_context
  from lightning.app.utilities.enum import ComponentContext
label_desc: Use image node_id 4 for calling a global function with example usage: test_is_context() without return types