code: def test_revert_sync_batchnorm(self) -> None:
      original_batchnorm = torch.nn.modules.batchnorm.BatchNorm1d(4)
  
      none_throws(original_batchnorm.running_mean).random_(-1, 1)
      none_throws(original_batchnorm.running_var).random_(0, 1)
      model = torch.nn.Sequential(
          torch.nn.Linear(2, 4),
          original_batchnorm,
      )
  
      sync_bn_model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(
          model
      )
      reverted_model = revert_sync_batchnorm(sync_bn_model)
  
      _, batch_norm = reverted_model.children()
      self.assertIsInstance(
          batch_norm, torch.nn.modules.batchnorm._BatchNorm
      )
      self.assertNotIsInstance(batch_norm, torch.nn.SyncBatchNorm)
      self.assertTrue(
          torch.equal(
              batch_norm.running_mean,
              none_throws(original_batchnorm.running_mean),
          )
      )
      self.assertTrue(
          torch.equal(
              batch_norm.running_var,
              none_throws(original_batchnorm.running_var),
          )
      )
  
imports: import os
  import unittest
  from typing import Literal, Optional, Union
  from unittest.mock import MagicMock, patch
  from urllib.parse import parse_qs, urlparse
  import torch
  import torch.distributed
  import torch.distributed.launcher
  from pyre_extensions import none_throws
  from torchtnt.utils.distributed import _validate_global_rank_world_size, all_gather_tensors, destroy_process_group, get_file_init_method, get_global_rank, get_local_rank, get_local_world_size, get_process_group_backend_from_device, get_tcp_init_method, get_world_size, PGWrapper, rank_zero_fn, revert_sync_batchnorm, sync_bool
  from torchtnt.utils.test_utils import get_pet_launch_config
label_desc: Use image node_id 20 for calling the DistributedTest obj's underlying member method code with example usage: obj.test_revert_sync_batchnorm() without return types