code: def get_config_string(params, units=None):
      
      compact_str_items = []
      # first make a list of compact strings for each parameter
      for k, v in params.items():
          unit = ""
          if isinstance(units, dict): #check if not None not enough, units could be mocked which causes errors
              unit = units.get(k, "")
          compact_str_items.append(k + "=" + str(v) + unit)
      # and finally join them
      compact_str = ", ".join(compact_str_items)
      return compact_str
docs: return a compact string representation of a dictionary