code: def store(self, result, filename, pretty=True):
          
          LOGGER.info("Storing result in '%s'.", filename)
          if filename.endswith(".gz"):
              with gzip.open(filename, "wb") as file_handle:
                  file_handle.write(
                      jsonify(result, pretty=pretty).encode("utf-8")
                  )
          else:
              with open(filename, "w", encoding="utf-8") as file_handle:
                  file_handle.write(jsonify(result, pretty=pretty))
docs: Write a result to the given file.
  
          Parameters
          ----------
          result : memote.MemoteResult
              The dictionary structure of results.
          filename : str or pathlib.Path
              Store results directly to the given filename.
          pretty : bool, optional
              Whether (default) or not to write JSON in a more legible format.