def decode(self, codes):
assert codes.ndim == <NUM_LIT:2><EOL>N, M = codes.shape<EOL>assert M == self.M<EOL>assert codes.dtype == self.code_dtype<EOL>vecs = np.empty((N, self.Ds * self.M), dtype=np.float32)<EOL>for m in range(self.M):<EOL><INDENT>vecs[:, m * self.Ds : (m+<NUM_LIT:1>) * self.Ds] = self.codewords[m][codes[:, m], :]<EOL><DEDENT>return vecs<EOL>
Given PQ-codes, reconstruct original D-dimensional vectors
        approximately by fetching the codewords.

        Args:
            codes (np.ndarray): PQ-cdoes with shape=(N, M) and dtype=self.code_dtype.
                Each row is a PQ-code

        Returns:
            np.ndarray: Reconstructed vectors with shape=(N, D) and dtype=np.float32