def embed(self, documents: List[str], verbose: bool = False) -> np.ndarray:
        """Embed a list of n documents/words into an n-dimensional
        matrix of embeddings.

        Arguments:
            documents: A list of documents or words to be embedded
            verbose: Controls the verbosity of the process

        Returns:
            Document/words embeddings with shape (n, m) with `n` documents/words
            that each have an embeddings size of `m`
        """
        # Handle empty documents, spaCy models automatically map
        # empty strings to the zero vector
        empty_document = " "

        # Extract embeddings
        embeddings = []
        for doc in tqdm(documents, position=0, leave=True, disable=not verbose):
            embedding = self.embedding_model(doc or empty_document)
            if embedding.has_vector:
                embedding = embedding.vector
            else:
                embedding = embedding._.trf_data.tensors[-1][0]

            if not isinstance(embedding, np.ndarray) and hasattr(embedding, "get"):
                # Convert cupy array to numpy array
                embedding = embedding.get()
            embeddings.append(embedding)

        return np.array(embeddings)
Embed a list of n documents/words into an n-dimensional
        matrix of embeddings.

        Arguments:
            documents: A list of documents or words to be embedded
            verbose: Controls the verbosity of the process

        Returns:
            Document/words embeddings with shape (n, m) with `n` documents/words
            that each have an embeddings size of `m`
        
bertopic/backend/_spacy.py