docstr: Saves label ids map to a file 
docstr_tok: ["Saves","label","ids","map","to","a","file"]
code: def _save_label_ids(
      self, label_ids: Dict[str, int], filename: str
  ) -> None:
      """Saves label ids map to a file"""
      with open(filename, "w") as out:
          labels, _ = zip(
              *sorted(label_ids.items(), key=lambda x: x[1])
          )
          out.write("\n".join(labels))
          logging.info(f"Labels: {label_ids}")
          logging.info(f"Labels mapping saved to : {out.name}")
  
imports: import os
  from typing import Dict, List, Optional
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from torch.utils.data import DataLoader
  from nemo.collections.common.losses import AggregatorLoss, CrossEntropyLoss
  from nemo.collections.nlp.data.dialogue.data_processor.assistant_data_processor import DialogueAssistantDataProcessor
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_bert_dataset import DialogueBERTDataset, DialogueIntentSlotInferenceDataset
  from nemo.collections.nlp.data.intent_slot_classification import IntentSlotDataDesc
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueClassificationMetrics
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common import SequenceTokenClassifier
  from nemo.collections.nlp.parts.utils_funcs import tensor2list
  from nemo.core.classes import typecheck
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling the IntentSlotClassificationModel obj's underlying member method code with example usage: obj._save_label_ids(label_ids, filename) without return types