code: def test_distributed_logging(self, tmp_path: pathlib.Path):
      num_procs = 2
  
      launch_config = pytorch_utils.setup_torch_distributed(
          local_procs=num_procs
      )
  
      outputs = launcher.elastic_launch(launch_config, run_no_op)(
          tmp_path
      )
  
      log_output = sum([outputs[i] for i in range(num_procs)], [])
  
      patterns = [
          f"finished train_batch for rank {i}" for i in range(num_procs)
      ]
  
      utils.assert_patterns_in_logs(log_output, patterns)
  
imports: import contextlib
  import importlib
  import io
  import os
  import pathlib
  import sys
  import typing
  from unittest import mock
  import numpy
  import pytest
  import torch
  from _pytest import monkeypatch
  from torch.distributed import launcher
  import determined
  from determined import pytorch
  from tests.experiment import pytorch_utils, utils
  from tests.experiment.fixtures import pytorch_onevar_model
label_desc: Use image node_id 29 for calling the TestPyTorchTrial obj's underlying member method code with example usage: obj.test_distributed_logging(tmp_path) without return types