  def ListInstanceTypes(self,
                        region: Optional[str] = None) -> List[Dict[str, Any]]:
    """Returns a list of available VM sizes for a given region.

    Args:
      region (str): Optional. The region in which to look the instance types.
          By default, look in the default_region associated to the AZAccount
          object.

    Returns:
      List[Dict[str, str]]: A list of available vm size. Each size is a
          dictionary containing the name of the configuration, its famly,
          the number of CPU cores, the amount of available memory (in MB),
          and whether it can handle PremiumIO devices.
          e.g.: {
            'Name': 'Standard_B1ls',
            'Family': 'standardB1lsFamily'
            'CPU': 1,
            'Memory': 512,
            'PremiumIO': True
          }
    """
    if not region:
      region = self.az_account.default_region
    available_vms = self.compute_client.resource_skus.list(
        filter='location eq \'{0:s}\''.format(region))
    vm_sizes = []
    for vm in available_vms:
      cores = None
      memory = None
      prem_io = False
      if vm.capabilities:
        for capability in vm.capabilities:
          if capability.name == 'vCPUs':
            cores = int(capability.value)
          if capability.name == 'MemoryGB':
            memory = int(float(capability.value) * 1024)
          if capability.name == 'PremiumIO':
            prem_io = capability.value == 'True'
      if cores and memory:
        vm_sizes.append({
            'Name': vm.name,
            'Family': vm.family,
            'CPU': cores,
            'Memory': memory,
            'PremiumIO': prem_io
        })
    return vm_sizes
Returns a list of available VM sizes for a given region.

Args:
region (str): Optional. The region in which to look the instance types.
By default, look in the default_region associated to the AZAccount
object.

Returns:
List[Dict[str, str]]: A list of available vm size. Each size is a
dictionary containing the name of the configuration, its famly,
the number of CPU cores, the amount of available memory (in MB),
and whether it can handle PremiumIO devices.
e.g.: {
'Name': 'Standard_B1ls',
'Family': 'standardB1lsFamily'
'CPU': 1,
'Memory': 512,
'PremiumIO': True
}
libcloudforensics/providers/azure/internal/compute.py