docstr: Setup function for a infer data loader.
  Args:
      queries: text
      batch_size: batch size to use during inference
  Returns:
      A pytorch DataLoader.
docstr_tok: ["Setup","function","for","a","infer","data","loader",".","Args",":","queries",":","text","batch_size",":","batch","size","to","use","during","inference","Returns",":","A","pytorch","DataLoader","."]
code: def _setup_infer_dataloader(
      self, queries: List[str], test_ds
  ) -> "torch.utils.data.DataLoader":
      """
      Setup function for a infer data loader.
      Args:
          queries: text
          batch_size: batch size to use during inference
      Returns:
          A pytorch DataLoader.
      """
  
      dataset = DialogueIntentSlotInferenceDataset(
          tokenizer=self.tokenizer,
          queries=queries,
          max_seq_length=-1,
          do_lower_case=False,
      )
  
      return torch.utils.data.DataLoader(
          dataset=dataset,
          collate_fn=dataset.collate_fn,
          batch_size=test_ds.batch_size,
          shuffle=test_ds.shuffle,
          num_workers=test_ds.num_workers,
          pin_memory=test_ds.pin_memory,
          drop_last=test_ds.drop_last,
      )
  
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 21 for calling the IntentSlotClassificationModel obj's underlying member method code with example usage: obj._setup_infer_dataloader(queries, test_ds) and returns: torch