def as_dict(self, keys):
        """
            multi-key index construction:
                buf:    key -> [idx]
                window: idx -> item
        """
        buf = {}
        idx = 0
        while idx < self.size():
            elem = self.__getitem__(idx)
            self.key_map_fn(elem)
            for key in make_index_by_attr(keys, elem.item):
                if key not in buf:
                    buf[key] = [idx]
                else:
                    buf[key].append(idx)
            idx += 1
        return buf

            multi-key index construction:
                buf:    key -> [idx]
                window: idx -> item
        
fedlearner/data_join/joiner_impl/universal_joiner.py