  def GetVolumesByName(self,
                       volume_name: str,
                       region: Optional[str] = None) -> List[AWSVolume]:
    """Get all volumes from an AWS account with matching name tag.

    Args:
      volume_name (str): The volume name tag.
      region (str): Optional. The region to look the volume in.
          If none provided, the default_region associated to the AWSAccount
          object will be used.

    Returns:
      List[AWSVolume]: A list of EC2 Volume objects. If no volume with
          matching name tag is found, the method returns an empty list.
    """

    volumes = self.ListVolumes(region=region)
    return [volume for volume in volumes.values() if
            volume.name == volume_name]
Get all volumes from an AWS account with matching name tag.

Args:
volume_name (str): The volume name tag.
region (str): Optional. The region to look the volume in.
If none provided, the default_region associated to the AWSAccount
object will be used.

Returns:
List[AWSVolume]: A list of EC2 Volume objects. If no volume with
matching name tag is found, the method returns an empty list.
libcloudforensics/providers/aws/internal/ebs.py