nodes: 0, module; 1, function_definition; 2, function_name:render_value; 3, parameters; 4, block; 5, identifier:value; 6, expression_statement; 7, if_statement; 8, comment:"""Render a value, ensuring that any nested dicts are sorted by key."""; 9, call; 10, block; 11, elif_clause; 12, else_clause; 13, identifier:isinstance; 14, argument_list; 15, return_statement; 16, call; 17, block; 18, block; 19, identifier:value; 20, identifier:list; 21, binary_operator:'[' + ', '.join(render_value(v) for v in value) + ']'; 22, identifier:isinstance; 23, argument_list; 24, return_statement; 25, return_statement; 26, binary_operator:'[' + ', '.join(render_value(v) for v in value); 27, string; 28, identifier:value; 29, identifier:dict; 30, parenthesized_expression; 31, call; 32, string; 33, call; 34, string_content:]; 35, binary_operator:'{' +
              ', '.join('{k!r}: {v}'.format(
                  k=k, v=render_value(v)) for k, v in sorted(value.items())) +
              '}'; 36, identifier:repr; 37, argument_list; 38, string_content:[; 39, attribute; 40, generator_expression; 41, binary_operator:'{' +
              ', '.join('{k!r}: {v}'.format(
                  k=k, v=render_value(v)) for k, v in sorted(value.items())); 42, string; 43, identifier:value; 44, string; 45, identifier:join; 46, call; 47, for_in_clause; 48, string; 49, call; 50, string_content:}; 51, string_content:,; 52, identifier:render_value; 53, argument_list; 54, identifier:v; 55, identifier:value; 56, string_content:{; 57, attribute; 58, generator_expression; 59, identifier:v; 60, string; 61, identifier:join; 62, call; 63, for_in_clause; 64, string_content:,; 65, attribute; 66, argument_list; 67, pattern_list; 68, call; 69, string; 70, identifier:format; 71, keyword_argument; 72, keyword_argument; 73, identifier:k; 74, identifier:v; 75, identifier:sorted; 76, argument_list; 77, string_content:{k!r}: {v}; 78, identifier:k; 79, identifier:k; 80, identifier:v; 81, call; 82, call; 83, identifier:render_value; 84, argument_list; 85, attribute; 86, argument_list; 87, identifier:v; 88, identifier:value; 89, identifier:items
code: def render_value(value):
      """Render a value, ensuring that any nested dicts are sorted by key."""
      if isinstance(value, list):
          return '[' + ', '.join(render_value(v) for v in value) + ']'
      elif isinstance(value, dict):
          return (
              '{' +
              ', '.join('{k!r}: {v}'.format(
                  k=k, v=render_value(v)) for k, v in sorted(value.items())) +
              '}')
      else:
          return repr(value)