<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_json(self, *, include_keys=None, exclude_keys=None, use_default_excludes=True, pretty=False):
 """Converts the response from to_dict to a JSON string. If pretty is True then newlines, indentation and key sorting are used. """

    return to_json(
      self.to_dict(
        include_keys=include_keys,
        exclude_keys=exclude_keys,
        use_default_excludes=use_default_excludes),
      pretty=pretty)