getFeatureById(id) {
    const feature = this.idIndex_[id.toString()];
    return feature !== undefined
      ? /** @type {FeatureClassOrArrayOfRenderFeatures<FeatureType>} */ (
          feature
        )
      : null;
  }
Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s
are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling
of `GeometryCollection` geometries, where format readers create one `RenderFeature` per
`GeometryCollection` member.
Note that the index treats string and numeric identifiers as the same.  So
`source.getFeatureById(2)` will return a feature with id `'2'` or `2`.

@param {string|number} id Feature identifier.
@return {FeatureClassOrArrayOfRenderFeatures<FeatureType>|null} The feature (or `null` if not found).
@api