nodes: 0, module; 1, function_definition; 2, function_name:to_json; 3, parameters; 4, block; 5, identifier:self; 6, keyword_separator; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, return_statement; 13, identifier:include_keys; 14, None; 15, identifier:exclude_keys; 16, None; 17, identifier:use_default_excludes; 18, True; 19, identifier:pretty; 20, False; 21, comment:"""Converts the response from to_dict to a JSON string. If pretty is True then newlines,
      indentation and key sorting are used.
      """; 22, call; 23, identifier:to_json; 24, argument_list; 25, call; 26, keyword_argument; 27, attribute; 28, argument_list; 29, identifier:pretty; 30, identifier:pretty; 31, identifier:self; 32, identifier:to_dict; 33, keyword_argument; 34, keyword_argument; 35, keyword_argument; 36, identifier:include_keys; 37, identifier:include_keys; 38, identifier:exclude_keys; 39, identifier:exclude_keys; 40, identifier:use_default_excludes; 41, identifier:use_default_excludes
code: 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)