'Helper routine for __getitem__ that constructs a Feature from the given
Feature ID.  If the OGR Layer does not support random-access reading,
then each feature of the layer will be incremented through until the
a Feature is found matching the given feature ID.'

def _make_feature(self, feat_id):

    if self._random_read:
        with suppress(GDALException):
            return Feature(capi.get_feature(self.ptr, feat_id), self)
    else:
        for feat in self:
            if (feat.fid == feat_id):
                return feat
    raise OGRIndexError(('Invalid    feature    id:    %s.' % feat_id))
