code: def test_pretrained_titanet_embeddings(self, test_data_dir):
      model_name = "titanet_large"
      speaker_model = EncDecSpeakerLabelModel.from_pretrained(
          model_name
      )
      assert isinstance(speaker_model, EncDecSpeakerLabelModel)
      relative_filepath = (
          "an4_speaker/an4/wav/an4_clstk/fash/an251-fash-b.wav"
      )
      filename = os.path.join(test_data_dir, relative_filepath)
  
      emb, logits = speaker_model.infer_file(filename)
  
      class_id = logits.argmax(axis=-1)
      emb_sum = emb.sum()
  
      assert 11144 == class_id
      assert (emb_sum + 0.2575) <= 1e-2
  
file_path: NeMo/tests/collections/asr/test_speaker_label_models.py
imports: import json
  import os
  import tempfile
  from unittest import TestCase
  import pytest
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.models import EncDecSpeakerLabelModel
label_desc: Use image node_id 1 for calling the TestEncDecSpeechLabelModel obj's underlying member method code with example usage: obj.test_pretrained_titanet_embeddings(test_data_dir) without return types