  def ListInstances(self) -> Dict[str, 'GoogleComputeInstance']:
    """List instances in project.

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

    instances = {}
    gce_instance_client = self.GceApi().instances() # pylint: disable=no-member
    responses = common.ExecuteRequest(
        gce_instance_client, 'aggregatedList', {'project': self.project_id})

    for response in responses:
      for zone in response['items']:
        try:
          for instance in response['items'][zone]['instances']:
            _, zone = instance['zone'].rsplit('/', 1)
            name = instance['name']
            resource_id = instance['id']
            deletion_protection = instance.get('deletionProtection', False)
            instances[resource_id] = GoogleComputeInstance(
                self.project_id,
                zone,
                name,
                resource_id=resource_id,
                labels=instance.get('labels'),
                deletion_protection=deletion_protection)
        except KeyError:
          pass

    return instances
List instances in project.

Returns:
Dict[str, GoogleComputeInstance]: Dictionary mapping instance IDs (str)
to their respective GoogleComputeInstance object.
libcloudforensics/providers/gcp/internal/compute.py