code: def test_progress_tracker_enabled(rank):
      trainer = Mock()
      trainer.global_rank = rank
      trainer.is_global_zero = rank == 0
      work = Mock()
      tracker = PLAppProgressTracker(work)
      assert not tracker.is_enabled
      tracker.setup(trainer, Mock(), Mock())
      assert tracker.is_enabled == trainer.is_global_zero
  
file_path: pytorch-lightning/src/lightning/app/cli/pl-app-template/tests/core/test_callbacks.py
imports: import os.path
  from unittest.mock import Mock
  import pytest
  from core.callbacks import PLAppArtifactsTracker, PLAppProgressTracker, PLAppSummary
  from core.components.script_runner import ScriptRunner
  from lightning.app.storage.path import Path
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.loggers import TensorBoardLogger
label_desc: Use image node_id 1 for calling a global function with example usage: test_progress_tracker_enabled(rank) without return types