code: def test_single_device_ranks(device):
      strategy = SingleDeviceStrategy(device)
      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_single_device.py
imports: from unittest.mock import Mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.strategies import SingleDeviceStrategy
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_single_device_ranks(device) without return types