code: def test_mean_variance_speaker_normalization(self):
      field = "pitch"
      filename = "stats.json"
      stat_dict = {
          "default": {"pitch_mean": 1.5, "pitch_std": 0.5},
          "speaker1": {"pitch_mean": 0.5, "pitch_std": 1.0},
          "speaker2": {"pitch_mean": 0.0, "pitch_std": 2.0},
      }
  
      input_tensor = torch.tensor([0.0, 1.0], dtype=torch.float32)
  
      training_example1 = {field: input_tensor, "speaker": "speaker1"}
      training_example2 = {field: input_tensor, "speaker": "speaker2"}
      training_example3 = {field: input_tensor, "speaker": "unknown"}
      expected_tensor1 = torch.tensor([-0.5, 0.5], dtype=torch.float32)
      expected_tensor2 = torch.tensor([0.0, 0.5], dtype=torch.float32)
      expected_tensor3 = torch.tensor([-3.0, -1.0], dtype=torch.float32)
  
      with self._write_test_dict(
          stat_dict, filename=filename
      ) as stat_dict_filepath:
          processor = MeanVarianceSpeakerNormalization(
              field,
              stats_path=stat_dict_filepath,
              mask_field=None,
              fallback_to_default=True,
          )
          processor.process(training_example1)
          processor.process(training_example2)
          processor.process(training_example3)
  
      output_tensor1 = training_example1[field]
      output_tensor2 = training_example2[field]
      output_tensor3 = training_example3[field]
      torch.testing.assert_close(output_tensor1, expected_tensor1)
      torch.testing.assert_close(output_tensor2, expected_tensor2)
      torch.testing.assert_close(output_tensor3, expected_tensor3)
  
file_path: NeMo/tests/collections/tts/parts/preprocessing/test_feature_processors.py
imports: import contextlib
  import json
  import tempfile
  from pathlib import Path
  import numpy
  import pytest
  import torch
  from nemo.collections.tts.parts.preprocessing.feature_processors import FeatureScaler, LogCompression, MeanVarianceNormalization, MeanVarianceSpeakerNormalization
label_desc: Use image node_id 7 for calling the TestTTSFeatureProcessors obj's underlying member method code with example usage: obj.test_mean_variance_speaker_normalization() without return types