code: function(obj) {
        if (obj == null) return void 0;
        return this._byId[obj] ||
          this._byId[this.entityId(obj.attributes || obj)] ||
          obj.cid && this._byId[obj.cid];
      }
docs: Get a entity from the set by id, cid, entity object with id or cid properties, or an attributes object that is transformed through entityId.