class_docstr: Similar to ZeroShotIntentDataset, but gets utterances and candidate labels from lists
  rather than sentence pairs and labels from a file.
class_docstr_tok: ["Similar","to","ZeroShotIntentDataset",",","but","gets","utterances","and","candidate","labels","from","lists","rather","than","sentence","pairs","and","labels","from","a","file","."]
docstr: Args:
      queries: list of utterances to classify
      candidate_labels: list of candidate labels
      tokenizer: such as AutoTokenizer
      max_seq_length: max sequence length including [CLS] and [SEP]
      hypothesis_template: template used to turn each candidate label into a NLI-style hypothesis
docstr_tok: ["Args",":","queries",":","list","of","utterances","to","classify","candidate_labels",":","list","of","candidate","labels","tokenizer",":","such","as","AutoTokenizer","max_seq_length",":","max","sequence","length","including","[","CLS","]","and","[","SEP","]","hypothesis_template",":","template","used","to","turn","each","candidate","label","into","a","NLI-style","hypothesis"]
code: def __init__(
      self,
      queries: List[str],
      candidate_labels: List[str],
      tokenizer: TokenizerSpec,
      max_seq_length: int,
      hypothesis_template: str,
  ):
      """
      Args:
          queries: list of utterances to classify
          candidate_labels: list of candidate labels
          tokenizer: such as AutoTokenizer
          max_seq_length: max sequence length including [CLS] and [SEP]
          hypothesis_template: template used to turn each candidate label into a NLI-style hypothesis
      """
  
      logging.info(f"Processing queries for inference")
      self.tokenizer = tokenizer
      token_params = {
          "bos_token": None,
          "eos_token": tokenizer.eos_token,
          "pad_token": tokenizer.pad_token,
          "cls_token": tokenizer.cls_token,
          "sep_token_extra": tokenizer.eos_token
          if "roberta" in tokenizer.name.lower()
          else None,
      }
      self.examples = []
      for i, query in enumerate(queries):
          for j, candidate_label in enumerate(candidate_labels):
              guid = "query-%s-label-%s" % (i, j)
              text_a = query
              text_b = hypothesis_template.format(candidate_label)
              label = 3  # dummy label for inference; training labels are 0, 1, 2 or 0, 1
              self.examples.append(
                  InputExample(
                      guid=guid,
                      text_a=text_a,
                      text_b=text_b,
                      label=label,
                  )
              )
  
      self.features = self.convert_examples_to_features(
          self.examples,
          [0, 1, 2, 3],
          max_seq_length,
          tokenizer,
          output_mode="classification",
          **token_params,
      )
  
imports: import os
  import pickle
  from typing import Dict, List, Optional
  import torch
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.data_utils.data_preprocessing import DataProcessor, fill_class_weights, get_freq_weights, get_label_stats
  from nemo.collections.nlp.data.glue_benchmark.data_processors import InputExample
  from nemo.collections.nlp.data.glue_benchmark.glue_benchmark_dataset import GLUEDataset
  from nemo.collections.nlp.parts.utils_funcs import tensor2list
  from nemo.core.neural_types import CategoricalValuesType, ChannelType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 2 to create a new ZeroShotIntentInferenceDataset object from inherited base classes: GLUEDataset with example: obj = ZeroShotIntentInferenceDataset(queries, candidate_labels, tokenizer, max_seq_length, hypothesis_template)