import time


def strgmtime(gmtime):
    """Convert time to human readable format

    Args:
        gmtime (time.struct_time): Time to convert. Allow float type.

    Returns:
        str: Time in format '%H:%M:%S'.

    Raises:
        ValueError: If `gmtime` is not type `time.struct_time`.

    Examples:
        >>> strgmtime(time.gmtime(1.8))
        '00:00:01'
        >>> strgmtime(1.8)
        '00:00:01'
    """
    if isinstance(gmtime, float):
        gmtime = time.gmtime(gmtime)

    if not isinstance(gmtime, time.struct_time):
        raise ValueError("Wrong type %s. Required time.struct_time." \
            % type(gmtime).__name__)

    return time.strftime('%H:%M:%S', gmtime)