def save(self, filename):
<EOL>dat = normalize(self.normalize())<EOL>txt = json.dumps(dat)<EOL>if pimms.is_str(filename):<EOL><INDENT>filename = os.path.expandvars(os.path.expanduser(filename))<EOL>gz = (len(filename) > <NUM_LIT:3> and filename[-<NUM_LIT:3>:] == '<STR_LIT>')<EOL>with (gzip.open(filename, '<STR_LIT>') if gz else open(filename, '<STR_LIT>')) as f: f.write(txt)<EOL><DEDENT>else: filename.write(txt)<EOL>return filename<EOL>
map_projection.save(file) writes a json version of the given map_projection object to the
  given file name or stream object, file.