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