code: def get_gateway_user_data(authorized_key: str) -> str:
      return get_cloud_config(
          package_update=True,
          packages=[
              "nginx",
              "python3.10-venv",
          ],
          snap={"commands": [["install", "--classic", "certbot"]]},
          runcmd=[
              ["ln", "-s", "/snap/bin/certbot", "/usr/bin/certbot"],
              [
                  "sed",
                  "-i",
                  "s/# server_names_hash_bucket_size 64;/server_names_hash_bucket_size 128;/",
                  "/etc/nginx/nginx.conf",
              ],
              [
                  "su",
                  "ubuntu",
                  "-c",
                  " && ".join(get_dstack_gateway_commands()),
              ],
          ],
          ssh_authorized_keys=[authorized_key],
      )
  
imports: import os
  import re
  from abc import ABC, abstractmethod
  from typing import List, Optional
  import git
  import requests
  import yaml
  from dstack import version
  from dstack._internal import settings
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.instances import InstanceOfferWithAvailability, InstanceState, LaunchedGatewayInfo, LaunchedInstanceInfo
  from dstack._internal.core.models.runs import Job, Requirements, Run
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 8 for calling a global function with example usage: get_gateway_user_data(authorized_key) and returns: get_cloud_config