def round_dict(dic, places):
if places is None:<EOL><INDENT>for key, value in dic.items():<EOL><INDENT>dic[key] = round(value)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for key, value in dic.items():<EOL><INDENT>dic[key] = round(value, places)<EOL><DEDENT><DEDENT>
Rounds all values in a dict containing only numeric types to `places` decimal places.
If places is None, round to INT.