  def ListReservedExternalIps(self, zone: str) -> List[str]:
    """Lists all static external IP addresses that are available to a zone.

    The method first converts the zone to a region,
    and then queries the GCE addresses resource.

    Args:
      zone (str): The zone in which the returned IPs would be available.

    Returns:
      List[str]: The list of available IPs in the specified zone.

    Raises:
      ValueError: If the zone is malformed.
      errors.ResourceNotFoundError: If the request did not succeed.
    """
    # Convert zone to region
    zone_parts = zone.split('-')
    if len(zone_parts) != 3:
      raise ValueError('Invalid zone: {0:s}.'.format(zone))
    region = '-'.join(zone_parts[:-1])
    # Request list of addresses
    addresses_client = self.GceApi().addresses() # pylint: disable=no-member
    params = {'project': self.project_id, 'region': region}
    try:
      responses = common.ExecuteRequest(addresses_client, 'list', params)
    except HttpError as exception:
      message = 'Unable to list external IPs for {0:s}: {1:s}'.format(
          self.project_id, exception.error_details)
      raise errors.ResourceNotFoundError(message, __name__) from exception
    ip_addresses = []
    for response in responses:
      for address in response.get('items', []):
        is_reserved = address['status'] == 'RESERVED'
        is_external = address['addressType'] == 'EXTERNAL'
        if is_reserved and is_external:
          ip_address = address['address']
          ip_addresses.append(ip_address)
    return ip_addresses
Lists all static external IP addresses that are available to a zone.

The method first converts the zone to a region,
and then queries the GCE addresses resource.

Args:
zone (str): The zone in which the returned IPs would be available.

Returns:
List[str]: The list of available IPs in the specified zone.

Raises:
ValueError: If the zone is malformed.
errors.ResourceNotFoundError: If the request did not succeed.
libcloudforensics/providers/gcp/internal/compute.py