code: def write_pretty_dict_str(out, obj, indent=2):
      
      json.dump(obj,
                out,
                indent=indent,
                sort_keys=True,
                separators=(',', ': '),
                ensure_ascii=False,
                encoding="utf-8")
docs: writes JSON indented representation of `obj` to `out`