class_docstr: A prompt template.
class_docstr_tok: ["A","prompt","template","."]
docstr: Creates a prompt template.
  
  A prompt template is expressed in Jinja. It is rendered using an example
  from the corresponding Hugging Face datasets library (a dictionary). The
  separator ||| should appear once to divide the template into prompt and
  output. Generally, the prompt should provide information on the desired
  behavior, e.g., text passage and instructions, and the output should be
  a desired response.
  
  :param name: unique name (per dataset) for template
  :param jinja: template expressed in Jinja
  :param reference: string describing author or paper reference for template
  :param metadata: a Metadata object with template annotations
  :param answer_choices: Jinja expression for answer choices. Should produce
                         a ||| delimited string of choices that enumerates
                         the possible completions for templates that should
                         be evaluated as ranked completions. If None, then
                         the template is open-ended. This list is accessible
                         from within Jinja as the variable `answer_choices`.
docstr_tok: ["Creates","a","prompt","template",".","A","prompt","template","is","expressed","in","Jinja",".","It","is","rendered","using","an","example","from","the","corresponding","Hugging","Face","datasets","library","(","a","dictionary",")",".","The","separator","|||","should","appear","once","to","divide","the","template","into","prompt","and","output",".","Generally",",","the","prompt","should","provide","information","on","the","desired","behavior",",","e.g.",",","text","passage","and","instructions",",","and","the","output","should","be","a","desired","response",".",":","param","name",":","unique","name","(","per","dataset",")","for","template",":","param","jinja",":","template","expressed","in","Jinja",":","param","reference",":","string","describing","author","or","paper","reference","for","template",":","param","metadata",":","a","Metadata","object","with","template","annotations",":","param","answer_choices",":","Jinja","expression","for","answer","choices",".","Should","produce","a","|||","delimited","string","of","choices","that","enumerates","the","possible","completions","for","templates","that","should","be","evaluated","as","ranked","completions",".","If","None",",","then","the","template","is","open-ended",".","This","list","is","accessible","from","within","Jinja","as","the","variable","`","answer_choices","`","."]
code: def __init__(
      self, name, jinja, reference, metadata=None, answer_choices=None
  ):
      """
      Creates a prompt template.
  
      A prompt template is expressed in Jinja. It is rendered using an example
      from the corresponding Hugging Face datasets library (a dictionary). The
      separator ||| should appear once to divide the template into prompt and
      output. Generally, the prompt should provide information on the desired
      behavior, e.g., text passage and instructions, and the output should be
      a desired response.
  
      :param name: unique name (per dataset) for template
      :param jinja: template expressed in Jinja
      :param reference: string describing author or paper reference for template
      :param metadata: a Metadata object with template annotations
      :param answer_choices: Jinja expression for answer choices. Should produce
                             a ||| delimited string of choices that enumerates
                             the possible completions for templates that should
                             be evaluated as ranked completions. If None, then
                             the template is open-ended. This list is accessible
                             from within Jinja as the variable `answer_choices`.
      """
      self.id = str(uuid.uuid4())
      self.name = name
      self.jinja = jinja
      self.reference = reference
      self.metadata = (
          metadata if metadata is not None else Template.Metadata()
      )
      self.answer_choices = answer_choices
  
imports: import logging
  import os
  import random
  import re
  import uuid
  from collections import Counter, defaultdict
  from shutil import rmtree
  from typing import Dict, List, Optional, Tuple
  import pandas
  import pkg_resources
  import yaml
  from jinja2 import BaseLoader, Environment, meta
  from ..constants import AUTOMM
label_desc: Use image node_id 1 to create a new Template object from inherited base classes: yaml with example: obj = Template(name, jinja, reference, metadata, answer_choices)