code: def write_networking_file(version, pairs):
      
  
      vmnets = OrderedDict(sorted(pairs.items(), key=lambda t: t[0]))
      try:
          with open(VMWARE_NETWORKING_FILE, "w", encoding="utf-8") as f:
              f.write(version)
              for key, value in vmnets.items():
                  f.write("answer {} {}\n".format(key, value))
      except OSError as e:
          raise SystemExit("Cannot open {}: {}".format(VMWARE_NETWORKING_FILE, e))
  
      # restart VMware networking service
      if sys.platform.startswith("darwin"):
          if not os.path.exists("/Applications/VMware Fusion.app/Contents/Library/vmnet-cli"):
              raise SystemExit("VMware Fusion is not installed in Applications")
          os.system(r"/Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure")
          os.system(r"/Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop")
          os.system(r"/Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start")
      else:
          os.system("vmware-networks --stop")
          os.system("vmware-networks --start")
docs: Write the VMware networking file.