code: def main():
      """Edits the uproject file to enable and disable the CarSim plugin"""
      argparser = argparse.ArgumentParser()
      argparser.add_argument(
          "-f",
          "--file",
          metavar="F",
          default="",
          type=str,
          help="Path to the uproject file",
      )
      argparser.add_argument(
          "-e", "--enable", action="store_true", help="enable carsim"
      )
      args = argparser.parse_args()
  
      # Read uproject (json) file
      uproject_file = open(args.file, "r")
      uproject_json = json.load(uproject_file)
      uproject_file.close()
  
      # Get the plugin list
      plugin_list = uproject_json["Plugins"]
  
      # Edit plugin
      should_do_changes = False
      carsim_found = False
      for plugin in plugin_list:
          if plugin["Name"] == "CarSim":
              if args.enable:
                  if not plugin["Enabled"]:
                      should_do_changes = True
                      plugin["Enabled"] = True
              else:
                  if plugin["Enabled"]:
                      should_do_changes = True
                      plugin["Enabled"] = False
              carsim_found = True
      if not carsim_found and args.enable:
          should_do_changes = True
          plugin_list.append(
              {
                  "Name": "CarSim",
                  "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/2d712649ca864c80812da7b5252f5608",
                  "Enabled": True,
              }
          )
  
      # Save file if there are changes to do
      if should_do_changes:
          uproject_file = open(args.file, "w")
          uproject_file.write(
              json.dumps(uproject_json, indent=4, sort_keys=True)
          )
          uproject_file.close()
  
imports: import glob
  import os
  import sys
  import argparse
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types