code: def test_mean_variance_normalization_masked(self):
      field = "test_feat"
      mask_field = "mask"
      filename = "stats.json"
      stat_dict = {
          "default": {"test_feat_mean": 1.0, "test_feat_std": 0.5}
      }
  
      input_tensor = torch.tensor(
          [2.0, 3.0, 4.0, 5.0], dtype=torch.float32
      )
      input_mask = torch.tensor(
          [True, False, False, True], dtype=torch.bool
      )
      expected_tensor = torch.tensor(
          [2.0, 0.0, 0.0, 8.0], dtype=torch.float32
      )
      training_example = {field: input_tensor, mask_field: input_mask}
  
      with self._write_test_dict(
          stat_dict, filename=filename
      ) as stat_dict_filepath:
          processor = MeanVarianceNormalization(
              field,
              stats_path=stat_dict_filepath,
              mask_field=mask_field,
          )
          processor.process(training_example)
  
      output_tensor = training_example[field]
      torch.testing.assert_close(output_tensor, expected_tensor)
  
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 6 for calling the TestTTSFeatureProcessors obj's underlying member method code with example usage: obj.test_mean_variance_normalization_masked() without return types