nodes: 0, module; 1, function_definition; 2, function_name:save_json; 3, parameters; 4, block; 5, identifier:py_obj; 6, identifier:json_path; 7, expression_statement; 8, with_statement; 9, comment:"""Serialize a native object to JSON and save it normalized, pretty printed to a
      file.
  
      The JSON string is normalized by sorting any dictionary keys.
  
      Args:
        py_obj: object
          Any object that can be represented in JSON. Some types, such as datetimes are
          automatically converted to strings.
  
        json_path: str
          File path to which to write the JSON file. E.g.: The path must exist. The
          filename will normally end with ".json".
  
      See Also:
        ToJsonCompatibleTypes()
  
      """; 10, with_clause; 11, block; 12, with_item; 13, expression_statement; 14, as_pattern; 15, call; 16, call; 17, as_pattern_target; 18, attribute; 19, argument_list; 20, identifier:open; 21, argument_list; 22, identifier:f; 23, identifier:f; 24, identifier:write; 25, call; 26, identifier:json_path; 27, string; 28, keyword_argument; 29, identifier:serialize_to_normalized_pretty_json; 30, argument_list; 31, string_content:w; 32, identifier:encoding; 33, string; 34, identifier:py_obj; 35, string_content:utf-8
code: def save_json(py_obj, json_path):
      """Serialize a native object to JSON and save it normalized, pretty printed to a
      file.
  
      The JSON string is normalized by sorting any dictionary keys.
  
      Args:
        py_obj: object
          Any object that can be represented in JSON. Some types, such as datetimes are
          automatically converted to strings.
  
        json_path: str
          File path to which to write the JSON file. E.g.: The path must exist. The
          filename will normally end with ".json".
  
      See Also:
        ToJsonCompatibleTypes()
  
      """
      with open(json_path, 'w', encoding='utf-8') as f:
          f.write(serialize_to_normalized_pretty_json(py_obj))