code: def write_options_to_JSON(self, filename):
          
          fd = open(filename, "w")
          fd.write(json.dumps(_options_to_dict(self.gc), indent=2,
                              separators=(',', ': ')))
          fd.close()
docs: Writes the options in JSON format to a file.
  
          :param str filename: Target file to write the options.