code: def get_instance_type_details(instance_type, region=DEFAULT_REGION):
      """
      Get instance type details for a given instance type
      :param instance_type: Instance type to be queried
      :param region: Region where query will be performed
      :return: <dict> Information about instance type
      """
      client = boto3.client("ec2", region_name=region)
      response = client.describe_instance_types(
          InstanceTypes=[instance_type]
      )
      if not response or not response["InstanceTypes"]:
          raise Exception(
              "Unable to get instance details. No response received."
          )
      if response["InstanceTypes"][0]["InstanceType"] != instance_type:
          raise Exception(
              f"Bad response received. Requested {instance_type} "
              f"but got {response['InstanceTypes'][0]['InstanceType']}"
          )
      return response["InstanceTypes"][0]
  
imports: import boto3
  import os
  import time
  import re
  from inspect import signature
  import random
  from retrying import retry
  from fabric2 import Connection
  from botocore.config import Config
  from botocore.exceptions import ClientError
  from invoke import run
  from invoke.context import Context
  from .None import DEFAULT_REGION, LOGGER
label_desc: Use image node_id 14 for calling a global function with example usage: get_instance_type_details(instance_type, region) and returns: response