code: def _add_ssh_key(
      api_client: LambdaAPIClient,
      ssh_key_names: List[str],
      public_key: str,
  ) -> str:
      key_name = _get_ssh_key_name(public_key)
      if key_name in ssh_key_names:
          return key_name
      api_client.add_ssh_key(name=key_name, public_key=public_key)
      return key_name
  
imports: import hashlib
  import subprocess
  import tempfile
  import time
  from threading import Thread
  from typing import Dict, List, Optional, Tuple
  from pydantic import BaseModel
  from dstack._internal.core.backends.base.compute import Compute, get_instance_name, get_shim_commands
  from dstack._internal.core.backends.base.offers import get_catalog_offers
  from dstack._internal.core.backends.lambdalabs.api_client import LambdaAPIClient
  from dstack._internal.core.backends.lambdalabs.config import LambdaConfig
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.instances import InstanceAvailability, InstanceOffer, InstanceOfferWithAvailability, LaunchedInstanceInfo
  from dstack._internal.core.models.runs import Job, Requirements, Run
label_desc: Use image node_id 3 for calling a global function with example usage: _add_ssh_key(api_client, ssh_key_names, public_key) and returns: key_name, key_name