code: def list_spot_requests_for_stack(
      stack_name: str, boto3_session: boto3.session.Session
  ) -> List[Dict]:
      tag_key, tag_val = get_management_tag_key_value(stack_name)
      ec2 = boto3_session.client("ec2")
      response = ec2.describe_spot_instance_requests(
          Filters=[
              {"Name": f"tag:{tag_key}", "Values": [tag_val]},
              {"Name": "state", "Values": ["open", "active"]},
          ]
      )
      spot_requests = response["SpotInstanceRequests"]
      reqs = []
      for s in spot_requests:
          req = {
              "id": s["SpotInstanceRequestId"],
              "state": s["State"],
              "statusCode": s["Status"]["Code"],
              "statusMessage": s["Status"]["Message"],
              "instanceId": s.get("InstanceId", None),
          }
          reqs.append(req)
      return reqs
  
imports: import sys
  import threading
  import time
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import boto3
  import tqdm
  from botocore.exceptions import ClientError, WaiterError
  from determined.deploy.aws import constants
label_desc: Use image node_id 19 for calling a global function with example usage: list_spot_requests_for_stack(stack_name, boto3_session) and returns: reqs