nodes: 0, module; 1, function_definition; 2, function_name:to_json; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, function_definition; 11, return_statement; 12, identifier:indent; 13, None; 14, identifier:separators; 15, None; 16, identifier:sort_keys; 17, False; 18, comment:"""Serializes the hyperparameters into JSON.
  
      Args:
        indent: If a non-negative integer, JSON array elements and object members
          will be pretty-printed with that indent level. An indent level of 0, or
          negative, will only insert newlines. `None` (the default) selects the
          most compact representation.
        separators: Optional `(item_separator, key_separator)` tuple. Default is
          `(', ', ': ')`.
        sort_keys: If `True`, the output dictionaries will be sorted by key.
  
      Returns:
        A JSON string.
      """; 19, function_name:remove_callables; 20, parameters; 21, block; 22, call; 23, identifier:x; 24, expression_statement; 25, if_statement; 26, return_statement; 27, attribute; 28, argument_list; 29, comment:"""Omit callable elements from input with arbitrary nesting."""; 30, call; 31, block; 32, elif_clause; 33, identifier:x; 34, identifier:json; 35, identifier:dumps; 36, call; 37, keyword_argument; 38, keyword_argument; 39, keyword_argument; 40, identifier:isinstance; 41, argument_list; 42, return_statement; 43, call; 44, block; 45, identifier:remove_callables; 46, argument_list; 47, identifier:indent; 48, identifier:indent; 49, identifier:separators; 50, identifier:separators; 51, identifier:sort_keys; 52, identifier:sort_keys; 53, identifier:x; 54, identifier:dict; 55, dictionary_comprehension; 56, identifier:isinstance; 57, argument_list; 58, return_statement; 59, call; 60, pair; 61, for_in_clause; 62, if_clause; 63, identifier:x; 64, identifier:list; 65, list_comprehension; 66, attribute; 67, argument_list; 68, identifier:k; 69, call; 70, pattern_list; 71, call; 72, not_operator; 73, call; 74, for_in_clause; 75, if_clause; 76, identifier:self; 77, identifier:values; 78, identifier:remove_callables; 79, argument_list; 80, identifier:k; 81, identifier:v; 82, attribute; 83, argument_list; 84, call; 85, identifier:remove_callables; 86, argument_list; 87, identifier:i; 88, identifier:x; 89, not_operator; 90, identifier:v; 91, identifier:six; 92, identifier:iteritems; 93, identifier:x; 94, identifier:callable; 95, argument_list; 96, identifier:i; 97, call; 98, identifier:v; 99, identifier:callable; 100, argument_list; 101, identifier:i
code: def to_json(self, indent=None, separators=None, sort_keys=False):
      """Serializes the hyperparameters into JSON.
  
      Args:
        indent: If a non-negative integer, JSON array elements and object members
          will be pretty-printed with that indent level. An indent level of 0, or
          negative, will only insert newlines. `None` (the default) selects the
          most compact representation.
        separators: Optional `(item_separator, key_separator)` tuple. Default is
          `(', ', ': ')`.
        sort_keys: If `True`, the output dictionaries will be sorted by key.
  
      Returns:
        A JSON string.
      """
      def remove_callables(x):
        """Omit callable elements from input with arbitrary nesting."""
        if isinstance(x, dict):
          return {k: remove_callables(v) for k, v in six.iteritems(x)
                  if not callable(v)}
        elif isinstance(x, list):
          return [remove_callables(i) for i in x if not callable(i)]
        return x
      return json.dumps(
          remove_callables(self.values()),
          indent=indent,
          separators=separators,
          sort_keys=sort_keys)