class_docstr: SSLDisentangler is a Conformer based model for extracting disentangled content and speaker embeddings
  from an audio waveform. This model uses a pre-trained Conformer SSL model. To extract the linguistic content 
  and speaker representations using a pre-trained Conformer, two randomly initialized downstream 
  heads are added and the entire setup is finetuned in multi-task manner for speech recognition and speaker verification. 
  These representations can be used by FastPitchModel_SSL for voice conversion by swapping the speaker embedding 
  of a given source utterance, with the speaker embedding of a target speaker.
class_docstr_tok: ["SSLDisentangler","is","a","Conformer","based","model","for","extracting","disentangled","content","and","speaker","embeddings","from","an","audio","waveform",".","This","model","uses","a","pre-trained","Conformer","SSL","model",".","To","extract","the","linguistic","content","and","speaker","representations","using","a","pre-trained","Conformer",",","two","randomly","initialized","downstream","heads","are","added","and","the","entire","setup","is","finetuned","in","multi-task","manner","for","speech","recognition","and","speaker","verification",".","These","representations","can","be","used","by","FastPitchModel_SSL","for","voice","conversion","by","swapping","the","speaker","embedding","of","a","given","source","utterance",",","with","the","speaker","embedding","of","a","target","speaker","."]
code: def __setup_dataloader_from_config(self, data_config):
      if hasattr(self, "_text_tokenizer") and isinstance(
          self._text_tokenizer, BaseTokenizer
      ):
          _text_tokenizer = self._text_tokenizer
  
      else:
          if hasattr(self, "_text_tokenizer") and not isinstance(
              self._text_tokenizer, BaseTokenizer
          ):
              logging.warning(
                  f"test_tokenizer is set but not a BaseTokenizer. Will be set to EnglishCharsTokenizer"
              )
  
          _text_tokenizer = (
              self._text_tokenizer
          ) = EnglishCharsTokenizer(add_blank_at="last")
  
      for task in self._cfg.downstream_heads.task_names:
          if task == "speaker_verification":
              sv_dataset = TTSDataset(
                  manifest_filepath=data_config[
                      "manifest_speaker_verification_fp"
                  ],
                  sample_rate=self._cfg.sample_rate,
                  text_tokenizer=_text_tokenizer,
                  segment_max_duration=data_config[
                      "segment_max_duration"
                  ],
                  sup_data_types=["speaker_id"],
                  sup_data_path=data_config["sup_data_path"],
                  pad_multiple=data_config.get("pad_multiple", 1),
              )
              sv_loader = torch.utils.data.DataLoader(
                  sv_dataset,
                  batch_size=data_config["batch_size_sv"],
                  collate_fn=sv_dataset.general_collate_fn,
                  shuffle=data_config["shuffle"],
                  num_workers=data_config.get("num_workers_sv", 0),
                  pin_memory=data_config.get("pin_memory", False),
              )
  
          elif task == "content":
              content_dataset = TTSDataset(
                  manifest_filepath=data_config["manifest_content_fp"],
                  sample_rate=self._cfg.sample_rate,
                  text_tokenizer=_text_tokenizer,
                  min_duration=data_config["min_duration_content"],
                  max_duration=data_config["max_duration_content"],
                  pitch_augment=data_config.get("pitch_augment", False),
                  cache_pitch_augment=data_config.get(
                      "cache_pitch_augment", True
                  ),
                  sup_data_path=data_config["sup_data_path"],
                  pad_multiple=data_config.get("pad_multiple", 1),
              )
              content_loader = torch.utils.data.DataLoader(
                  content_dataset,
                  batch_size=data_config["batch_size_content"],
                  collate_fn=content_dataset.general_collate_fn,
                  shuffle=data_config["shuffle"],
                  num_workers=data_config.get("num_workers_content", 0),
                  pin_memory=data_config.get("pin_memory", False),
              )
  
          else:
              raise ValueError(
                  f"{task} is not a valid task. Task must be speaker_verification or content."
              )
  
      loaders = {"sv": sv_loader, "content": content_loader}
      return loaders
  
imports: import itertools
  from typing import Iterable, Optional
  import editdistance
  import librosa
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import TensorBoardLogger
  from pytorch_lightning.utilities.combined_loader import CombinedLoader
  from nemo.collections.asr.losses.angularloss import AngularSoftmaxLoss
  from nemo.collections.tts.data.dataset import TTSDataset
  from nemo.collections.tts.modules.ssl_tts import GreedyCTCDecoder
  from nemo.collections.tts.torch.tts_tokenizers import BaseTokenizer, EnglishCharsTokenizer
  from nemo.core.classes import ModelPT
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.core.optim.lr_scheduler import WarmupPolicy
  from nemo.utils import logging
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 4 for calling the SSLDisentangler obj's underlying member method code with example usage: obj.__setup_dataloader_from_config(data_config) and returns: loaders