docs: def save_json(filename, obj, normalize=True):
      '''
      save_json(filename, obj) writes the given object to the given filename (or stream) in a
        normalized JSON format.
  
      The optional argument normalize (default True) may be set to False to prevent the object from
      being run through neuropythy's normalize system.
      '''
      from neuropythy.util import normalize as norm
      dat = norm(obj) if normalize else obj
      if pimms.is_str(filename):
          if any(filename.endswith(s) for s in ('.gz', '.bz2', '.lzma')):
              with gzip.open(filename, 'wt') as fl: json.dump(dat, fl)
          else:
              with open(filename, 'wt') as fl: json.dump(dat, fl)
      else: json.dump(dat, filename)
      return filename