def METHOD_NAME(self, data):
    # Iterate over each data element, tokenize (if necessary) and build an aggregated embeddings vector
    embeddings = []
    for tokens in data:
        # Convert to tokens if necessary
        if isinstance(tokens, str):
            tokens = Tokenizer.tokenize(tokens)
        # Generate weights for each vector using a scoring method
        weights = self.scoring.weights(tokens) if self.scoring else None
        # pylint: disable=E1133
        if weights and [x for x in weights if x > 0]:
            # Build weighted average embeddings vector. Create weights array as float32 to match embeddings precision.
            embedding = np.average(self.lookup(tokens), weights=np.array(weights, dtype=np.float32), axis=0)
        else:
            # If no weights, use mean
            embedding = np.mean(self.lookup(tokens), axis=0)
        embeddings.append(embedding)
    return np.array(embeddings, dtype=np.float32)