  def ListInstances(
      self,
      region: Optional[str] = None,
      filters: Optional[List[Dict[str, Any]]] = None,
      show_terminated: bool = False) -> Dict[str, AWSInstance]:
    """List instances of an AWS account.

    Example usage:
      ListInstances(region='us-east-1', filters=[
          {'Name':'instance-id', 'Values':['some-instance-id']}])

    Args:
      region (str): Optional. The region from which to list instances.
          If none provided, the default_region associated to the AWSAccount
          object will be used.
      filters (List[Dict]): Optional. Filters for the query. Filters are
          given as a list of dictionaries, e.g.: {'Name': 'someFilter',
          'Values': ['value1', 'value2']}.
      show_terminated (bool): Optional. Include terminated instances in the
          list.

    Returns:
      Dict[str, AWInstance]: Dictionary mapping instance IDs (str) to their
          respective AWSInstance object.

    Raises:
      RuntimeError: If instances can't be listed.
    """

    if not filters:
      filters = []

    instances = {}
    client = self.aws_account.ClientApi(common.EC2_SERVICE, region=region)
    responses = common.ExecuteRequest(
        client, 'describe_instances', {'Filters': filters})

    for response in responses:
      for reservation in response['Reservations']:
        for instance in reservation['Instances']:
          # If reservation['Instances'] contains any entry, then the
          # instance's state is expected to be present in the API's response.
          if instance['State']['Name'] == 'terminated' and not show_terminated:
            continue

          zone = instance['Placement']['AvailabilityZone']
          instance_id = instance['InstanceId']
          vpc = instance.get('VpcId', None)
          aws_instance = AWSInstance(
              self.aws_account, instance_id, zone[:-1], zone, vpc)

          for tag in instance.get('Tags', []):
            if tag.get('Key') == 'Name':
              aws_instance.name = tag.get('Value')
              break

          instances[instance_id] = aws_instance
    return instances
List instances of an AWS account.

Example usage:
ListInstances(region='us-east-1', filters=[
{'Name':'instance-id', 'Values':['some-instance-id']}])

Args:
region (str): Optional. The region from which to list instances.
If none provided, the default_region associated to the AWSAccount
object will be used.
filters (List[Dict]): Optional. Filters for the query. Filters are
given as a list of dictionaries, e.g.: {'Name': 'someFilter',
'Values': ['value1', 'value2']}.
show_terminated (bool): Optional. Include terminated instances in the
list.

Returns:
Dict[str, AWInstance]: Dictionary mapping instance IDs (str) to their
respective AWSInstance object.

Raises:
RuntimeError: If instances can't be listed.
libcloudforensics/providers/aws/internal/ec2.py