code: def output_to_json(sources):
      
      results = OrderedDict()
      for source in sources:
          if source.get_is_available():
              source.update()
              source_name = source.get_source_name()
              results[source_name] = source.get_sensors_summary()
      print(json.dumps(results, indent=4))
      sys.exit()
docs: Print statistics to the terminal in Json format