class_docstr: Singleton object containing the current figure templates (aka themes)
class_docstr_tok: ["Singleton","object","containing","the","current","figure","templates","(","aka","themes",")"]
code: def __getitem__(self, item):
      if isinstance(item, string_types):
          template_names = item.split("+")
      else:
          template_names = [item]
  
      templates = []
      for template_name in template_names:
          template = self._templates[template_name]
          if template is Lazy:
              from plotly.graph_objs.layout import Template
  
              if template_name == "none":
                  # "none" is a special built-in named template that applied no defaults
                  template = Template(data_scatter=[{}])
                  self._templates[template_name] = template
              else:
                  # Load template from package data
                  path = os.path.join(
                      "package_data",
                      "templates",
                      template_name + ".json",
                  )
                  template_str = pkgutil.get_data(
                      "plotly", path
                  ).decode("utf-8")
                  template_dict = json.loads(template_str)
                  template = Template(template_dict, _validate=False)
  
                  self._templates[template_name] = template
          templates.append(self._templates[template_name])
  
      return self.merge_templates(*templates)
  
imports: from __future__ import absolute_import
  import textwrap
  import pkgutil
  import copy
  import os
  import json
  from functools import reduce
  from six import string_types
label_desc: Use image node_id 5 for calling the TemplatesConfig obj's underlying member method code with example usage: obj.__getitem__(item) and returns: self