def process_data(data, number_to_keep):
result = dict()<EOL>if number_to_keep != <NUM_LIT:0>:<EOL><INDENT>data_temp = dict(Counter(data).most_common(number_to_keep))<EOL>data_temp['<STR_LIT>'] = sum(data.values()) - sum(data_temp.values())<EOL>data = data_temp<EOL><DEDENT>labels = data<EOL>values = np.array([data[key] for key in labels], dtype=float)<EOL>pvalues = values / sum(values)<EOL>for position, label in enumerate(labels):<EOL><INDENT>result[label] = round(pvalues[position], <NUM_LIT:5>)<EOL><DEDENT>return result<EOL>
Prepare received data for representation.

        Args:
            data (dict): values to represent (ex. {'001' : 130})
            number_to_keep (int): number of elements to show individually.

        Returns:
            dict: processed data to show.