code: def get_user_data(
      backend: BackendType,
      image_name: str,
      authorized_keys: List[str],
      registry_auth_required: bool,
      cloud_config_kwargs: Optional[dict] = None,
  ) -> str:
      commands = get_shim_commands(
          backend=backend,
          image_name=image_name,
          authorized_keys=authorized_keys,
          registry_auth_required=registry_auth_required,
      )
      return get_cloud_config(
          runcmd=[["sh", "-c", " && ".join(commands)]],
          ssh_authorized_keys=authorized_keys,
          **(cloud_config_kwargs or {}),
      )
  
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 2 for calling a global function with example usage: get_user_data(backend, image_name, authorized_keys, registry_auth_required, cloud_config_kwargs) and returns: get_cloud_config