src/transformers/models/detr/modeling_detr.py/DetrAttention/with_pos_embed
class DetrAttention:    def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Optional[Tensor]):
        return tensor if position_embeddings is None else tensor + position_embeddings