code: def format_dict(d):
      ret = {}
      for key, val in d.items():
          if isinstance(val, dict):
              new_val = format_dict(val)
          elif isinstance(val, list):
              new_val = str(val)
          else:
              new_val = val
          ret[key] = new_val
      return ret
  
file_path: dvc/dvc/utils/diff.py
imports: import json
  from collections import defaultdict
  from typing import Dict
  from .flatten import flatten
label_desc: Use image node_id 7 for calling a global function with example usage: format_dict(d) and returns: ret