code: def install_action(args):
      user = pwd.getpwnam("ubuntu")
      uid, gid = user.pw_uid, user.pw_gid
  
      print("Writing service file...")
      service_file = importlib.resources.read_text(
          "dstack.gateway.systemd.resources", service_path.name
      )
      service_path.write_text(
          service_file.format(working_dir=working_dir.as_posix())
      )
  
      for script_name in ["start.sh", "update.sh"]:
          print(f"Writing {script_name} script...")
          script = importlib.resources.read_text(
              "dstack.gateway.systemd.resources", script_name
          )
          script_path = working_dir / script_name
          script_path.write_text(script)
          os.chown(script_path, uid, gid)
  
      print("Reloading systemd daemon...")
      assert (
          subprocess.run(["systemctl", "daemon-reload"]).returncode == 0
      )
  
      print("Enabling service...")
      args = ["--now"] if args.run else []
      assert (
          subprocess.run(
              ["systemctl", "enable", service_name] + args
          ).returncode
          == 0
      )
  
file_path: dstack/gateway/src/dstack/gateway/systemd/__main__.py
imports: import argparse
  import importlib.resources
  import os
  import pwd
  import subprocess
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: install_action(args) without return types