src/transformers/models/perceiver/modeling_perceiver.py/PerceiverTrainablePositionEncoding/forward
class PerceiverTrainablePositionEncoding:    def forward(self, batch_size: int) -> torch.Tensor:
        position_embeddings = self.position_embeddings

        if batch_size is not None:
            position_embeddings = position_embeddings.expand(batch_size, -1, -1)
        return position_embeddings