code: def _get_instance_info(
      api_client: LambdaAPIClient, instance_id: str
  ) -> Optional[Dict]:
      instances = api_client.list_instances()
      instance_id_to_instance_map = {i["id"]: i for i in instances}
      instance = instance_id_to_instance_map.get(instance_id)
      if instance is None:
          return None
      return instance
  
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 6 for calling a global function with example usage: _get_instance_info(api_client, instance_id) and returns: instance, None