def adist(self, codes):
assert codes.ndim == <NUM_LIT:2><EOL>N, M = codes.shape<EOL>assert M == self.dtable.shape[<NUM_LIT:0>]<EOL>dists = np.sum(self.dtable[range(M), codes], axis=<NUM_LIT:1>)<EOL>return dists<EOL>
Given PQ-codes, compute Asymmetric Distances between the query (self.dtable)
        and the PQ-codes.

        Args:
            codes (np.ndarray): PQ codes with shape=(N, M) and
                dtype=pq.code_dtype where pq is a pq instance that creates the codes

        Returns:
            np.ndarray: Asymmetric Distances with shape=(N, ) and dtype=np.float32