code: def test_data_parallel_ranks():
      strategy = DataParallelStrategy()
      assert strategy.world_size == 1
      assert strategy.local_rank == 0
      assert strategy.global_rank == 0
      assert strategy.is_global_zero
  
file_path: pytorch-lightning/tests/tests_fabric/strategies/test_dp.py
imports: from unittest import mock
  from unittest.mock import MagicMock, Mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.strategies import DataParallelStrategy
  from tests_fabric.helpers.runif import RunIf
  from tests_fabric.strategies.test_single_device import _run_test_clip_gradients
label_desc: Use image node_id 2 for calling a global function with example usage: test_data_parallel_ranks() without return types