docs: function getEntityNameKeyMap(structure) {
      const result = {};
      for (const kk in structure) {
        const vv = structure[kk];
        if (typeof vv === 'string') {
          if (types.isMap(vv)) {
            const info = types.getTypeInfo(vv);
            const entityName = info.entity;
  
            if (_entityNameType[entityName]) throw new Error(`Duplicate entity ${entityName}`);
            _entityNameType[entityName] = vv;
  
            result[entityName] = kk;
            delete structure[kk];
          }
        }
      }
      return result;
    }