code: def to_json(self, data):
          
          # Don't forget the empty line at the end of the file
          return (
              json.dumps(
                  data,
                  sort_keys=True,
                  indent=4,
                  separators=(",", ": "),
                  default=self.json_converter,
              )
              + "\n"
          )
docs: Converts the given object to a pretty-formatted JSON string
  
          :param data: the object to convert to JSON
          :return: A pretty-formatted JSON string