whole_func_string: function pickTemplate(templateName) {
          if (templateName === THE_ONLY_TEMPLATE)
              return theOnlyTemplate.promise;
          if (registry.hasOwnProperty(templateName))
              return registry[templateName].promise;
          if (registryComplete)
              throw noSuchTemplate(templateName);
          return (registry[templateName] = new Deferred()).promise;
      }
func_code_string: function pickTemplate(templateName) {
          if (templateName === THE_ONLY_TEMPLATE)
              return theOnlyTemplate.promise;
          if (registry.hasOwnProperty(templateName))
              return registry[templateName].promise;
          if (registryComplete)
              throw noSuchTemplate(templateName);
          return (registry[templateName] = new Deferred()).promise;
      }
func_documentation_string: Choose template for the given template name; returns a promise