  def Type(self) -> str:
    """Returns the type of this volume.

    Returns:
      str: The type of this volume.

    Raises:
      RuntimeError: If the type of this volume is not found.
    """
    # There is no attribute for a type, but rather the corresponding type
    # attribute is non-null.
    # https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md  # pylint: disable=line-too-long
    response_dict = self._response.to_dict()  # type: Dict[str, Any]
    for k, v in response_dict.items():
      if k != 'name' and v:
        return k
    raise RuntimeError('Volume type not found.')
Returns the type of this volume.

Returns:
str: The type of this volume.

Raises:
RuntimeError: If the type of this volume is not found.
libcloudforensics/providers/kubernetes/volume.py