code: function (nestedId) {
          if (nestedId == null) {
              return this.id;
          } else {
              if (typeof nestedId === 'string' && nestedId.endsWith('[]')) {
                  return repeatedId.nextId(this.out, this.id, nestedId);
              } else {
                  return this.id + '-' + nestedId;
              }
          }
      }
docs: This helper method generates a unique and fully qualified DOM element ID
  that is unique within the scope of the current widget. This method prefixes
  the the nestedId with the ID of the current widget. If nestedId ends
  with `[]` then it is treated as a repeated ID and we will generate
  an ID with the current index for the current nestedId.
  (e.g. "myParentId-foo[0]", "myParentId-foo[1]", etc.)