class_docstr: Class that wraps all templates for a specific dataset/subset and implements all the helper
  functions necessary to read/write to the yaml file
class_docstr_tok: ["Class","that","wraps","all","templates","for","a","specific","dataset\/subset","and","implements","all","the","helper","functions","necessary","to","read\/write","to","the","yaml","file"]
code: def __init__(self, dataset_name: str, subset_name: str = None):
      self.dataset_name: str = dataset_name
      self.subset_name: str = subset_name
      # dictionary is keyed by template name.
      self.templates: Dict = self.read_from_file()
  
      # Mapping from template name to template id
      self.name_to_id_mapping = {}
      self.sync_mapping()
  
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 DatasetTemplates object  with example: obj = DatasetTemplates(dataset_name, subset_name)