code: def _test_tracking(self, keep_bias):
      expected_calls = []
      for epoch in range(1, self.num_epochs + 1):
          layer_names = [""]
          if self.num_layer > 1:
              layer_names = []
              for layer_idx in range(self.num_layer):
                  layer_names.append(f"{layer_idx}.")
          for layer_name in layer_names:
              expected_calls.append(
                  call(
                      f"gradient_distributions/{layer_name}weight",
                      {"mean": ANY},
                      epoch,
                  )
              )
              expected_calls.append(
                  call(
                      f"gradient_distributions/{layer_name}weight",
                      {"mean_std_dev_up": ANY},
                      epoch,
                  )
              )
              expected_calls.append(
                  call(
                      f"gradient_distributions/{layer_name}weight",
                      {"mean_std_dev_down": ANY},
                      epoch,
                  )
              )
              expected_calls.append(
                  call(
                      f"other_gradient_stats/{layer_name}weight",
                      {"min": ANY},
                      epoch,
                  )
              )
              expected_calls.append(
                  call(
                      f"other_gradient_stats/{layer_name}weight",
                      {"max": ANY},
                      epoch,
                  )
              )
  
              if keep_bias:
                  expected_calls.append(
                      call(
                          f"gradient_distributions/{layer_name}bias",
                          {"mean": ANY},
                          epoch,
                      )
                  )
                  expected_calls.append(
                      call(
                          f"gradient_distributions/{layer_name}bias",
                          {"mean_std_dev_up": ANY},
                          epoch,
                      )
                  )
                  expected_calls.append(
                      call(
                          f"gradient_distributions/{layer_name}bias",
                          {"mean_std_dev_down": ANY},
                          epoch,
                      )
                  )
                  expected_calls.append(
                      call(
                          f"other_gradient_stats/{layer_name}bias",
                          {"min": ANY},
                          epoch,
                      )
                  )
                  expected_calls.append(
                      call(
                          f"other_gradient_stats/{layer_name}bias",
                          {"max": ANY},
                          epoch,
                      )
                  )
  
      method_calls = self.writer.add_scalars.mock_calls
      self.assertEqual(len(method_calls), len(expected_calls))
      self.assertEqual(method_calls, expected_calls)
  
      self.assertIn(expected_calls, method_calls)
  
imports: import math
  from tempfile import TemporaryDirectory
  from unittest import TestCase, skipIf
  from unittest.mock import ANY, MagicMock, call
  import torch
  import torch.nn
  from tests.framework.tools import some_data_generator
  from poutyne import GradientTracker, Model, TensorBoardGradientTracker, WeightsGradientsStatsTracker
label_desc: Use image node_id 8 for calling the TensorBoardGradientTrackerTest obj's underlying member method code with example usage: obj._test_tracking(keep_bias) without return types