code: def world_size(self) -> int:
      return max(torch.cuda.device_count() - 1, 1)
  
file_path: apex/apex/contrib/test/optimizers/test_distributed_fused_lamb.py
imports: import os
  import inspect
  import torch
  from torch.cuda.amp import GradScaler
  from torch.testing._internal import common_utils
  from apex.parallel.distributed import flat_dist_call
  from apex.contrib.optimizers.distributed_fused_lamb import DistributedFusedLAMB
  from apex.transformer.testing.distributed_test_base import NcclDistributedTestBase
label_desc: Use image node_id 1 for calling the NcclDistributedFusedLAMB_partial_ar obj's underlying member method code with example usage: obj.world_size() and returns: max