code: def test_functional_batch_norm(self, functional_call):
      module = torch.nn.BatchNorm1d(10)
      module.train()  # Allow stats update
      # lets replace the running_mean buffer and check if its correctly updated
      x = torch.full((20, 10), 128.0)
      rm = torch.zeros(10)
      parameters = {"running_mean": rm}
      prev_rm = module.running_mean.clone()
      res = functional_call(module, parameters, x)
      cur_rm = module.running_mean
      self.assertEqual(cur_rm, prev_rm)
      self.assertEqual(rm, torch.full((10,), 12.8))
      # Now run functional without reparametrization and check that the module has
      # been updated
      res = functional_call(module, {}, x)
      self.assertEqual(module.running_mean, torch.full((10,), 12.8))
  
imports: import contextlib
  import os
  import re
  import subprocess
  import sys
  import unittest
  import torch
  import torch.nn.utils.stateless
  from torch.testing._internal.common_cuda import TEST_MULTIGPU
  from torch.testing._internal.common_utils import run_tests, TestCase, parametrize, instantiate_parametrized_tests, subtest
label_desc: Use image node_id 8 for calling the TestStatelessFunctionalAPI obj's underlying member method code with example usage: obj.test_functional_batch_norm(functional_call) without return types