class_docstr: Tests that the conf.json file is formatted properly and is sorted alphabetically
  on the top-level key
code: def sort_json_file(self, file_path):
      self._logger.info("Sorting file: {}...".format(file_path))
  
      with open(file_path, "r") as infile:
          original_text = infile.read().strip()
  
      # Load the JSON document using OrderedDict, as it allows us to preserve the ordering
      # of the internal json keys. This is important for certain schemas, such as ones parsed
      # via csv, as the ordering of the keys does matter.
      schema = json.loads(original_text, object_pairs_hook=OrderedDict)
  
      # Sort the loaded schema by top-level key. Preserve the ordering of internal keys.
      ordered_schema = OrderedDict(
          sorted(list(schema.items()), key=lambda k: k[0])
      )
  
      with open(file_path, "w") as outfile:
          json.dump(
              ordered_schema, outfile, indent=2, separators=(",", ": ")
          )
          outfile.write("\n")
  
      self._logger.info("Sorting completed.")
  
imports: import json
  import os
  import logging
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling the JsonFileSorter obj's underlying member method code with example usage: obj.sort_json_file(file_path) without return types