def get_representation(
        self,
        sentences,
        pool="last",
        tokenize=False,
        return_numpy=True,
        add_start_end=True,
    ):
        """ Get model representations.

        Args:
            sentences(list): Sentences to get embeddings.
            pool(str): Type of getting hidden state.
            tokenize(bool): To tokenize or not.
            return_numpy(bool): To return a numpy array or not.
            add_start_end(bool): To add start and end notation (<s> </s>) to each
            sentence or not.

        Returns:
            torch.Tensor : Return last or all hidden states.

        """
        representations = [
            model.get_representation(
                sentences,
                pool=pool,
                tokenize=tokenize,
                return_numpy=return_numpy,
                add_start_end=add_start_end,
            )
            for model in self.gensen_models
        ]
        if return_numpy:
            return (
                np.concatenate([x[0] for x in representations], axis=2),
                np.concatenate([x[1] for x in representations], axis=1),
            )
        else:
            return (
                torch.cat([x[0] for x in representations], 2),
                torch.cat([x[1] for x in representations], 1),
            )
 Get model representations.

        Args:
            sentences(list): Sentences to get embeddings.
            pool(str): Type of getting hidden state.
            tokenize(bool): To tokenize or not.
            return_numpy(bool): To return a numpy array or not.
            add_start_end(bool): To add start and end notation (<s> </s>) to each
            sentence or not.

        Returns:
            torch.Tensor : Return last or all hidden states.

        
utils_nlp/models/gensen/gensen.py