code: private void registerTemplates(Iterable<TemplateType> templates, @Nullable Node scopeRoot) {
      if (!Iterables.isEmpty(templates)) {
        // Add any templates from JSDoc into our template scope.
        this.templateScope = typeRegistry.createScopeWithTemplates(templateScope, templates);
        // Register the template types on the scope root node, if there is one.
        if (scopeRoot != null) {
          typeRegistry.registerTemplateTypeNamesInScope(templates, scopeRoot);
        }
      }
    }
docs: Register the template keys in a template scope and on the function node.