(encrypted_bin_sum)
return result
Parameters
        ----------
        encrypted_bin_sum :  dict.
            {"keys": ['x1', 'x2' ...],
             "event_counts": [...],
             "non_event_counts": [...],
             bin_num": [...]
            }
        returns
        -------
                {'x1': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 'x2': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 ...
                }
Parameters
        ----------
        encrypted_bin_sum :  dict.
            {"keys": ['x1', 'x2' ...],
             "event_counts": [...],
             "non_event_counts": [...],
             bin_num": [...]
            }
        returns
        -------
                {'x1': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 'x2': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 ...
                }
Parameters ---------- encrypted_bin_sum : dict . { keys : [ x1 x2 ... ] event_counts : [ ... ] non_event_counts : [ ... ] bin_num : [ ... ] } returns ------- { x1 : [[ event_count non_event_count ] [ event_count non_event_count ] ... ] x2 : [[ event_count non_event_count ] [ event_count non_event_count ] ... ] ... }
def convert_decompress_format(encrypted_bin_sum):
        """
        Parameters
        ----------
        encrypted_bin_sum :  dict.
            {"keys": ['x1', 'x2' ...],
             "event_counts": [...],
             "non_event_counts": [...],
             bin_num": [...]
            }
        returns
        -------
                {'x1': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 'x2': [[event_count, non_event_count], [event_count, non_event_count] ... ],
                 ...
                }
        """
        result = {}
        start = 0
        event_counts = [int(x) for x in encrypted_bin_sum['event_counts']]
        non_event_counts = [int(x) for x in encrypted_bin_sum['non_event_counts']]
        for idx, k in enumerate(encrypted_bin_sum["keys"]):
            bin_num = encrypted_bin_sum["bin_nums"][idx]
            result[k] = list(zip(event_counts[start: start + bin_num], non_event_counts[start: start + bin_num]))
            start += bin_num
        assert start == len(event_counts) == len(non_event_counts), \
            f"Length of event/non-event does not match " \
            f"with bin_num sums, all_counts: {start}, length of event count: {len(event_counts)}," \
            f"length of non_event_counts: {len(non_event_counts)}"
        return result
def convert_decompress_format ( encrypted_bin_sum ) : result = { } start = 0 event_counts = [ int ( x ) for x in encrypted_bin_sum [ 'event_counts' ] ] non_event_counts = [ int ( x ) for x in encrypted_bin_sum [ 'non_event_counts' ] ] for idx , k in enumerate ( encrypted_bin_sum [ "keys" ] ) : bin_num = encrypted_bin_sum [ "bin_nums" ] [ idx ] result [ k ] = list ( zip ( event_counts [ start : start + bin_num ] , non_event_counts [ start : start + bin_num ] ) ) start += bin_num assert start == len ( event_counts ) == len ( non_event_counts ) , f"Length of event/non-event does not match " f"with bin_num sums, all_counts: {start}, length of event count: {len(event_counts)}," f"length of non_event_counts: {len(non_event_counts)}" return result