def pretty_time(time_in_seconds: float) ->str:
    """
    Return the time in a more friendly way.

    Parameters
    ----------
    time_in_seconds : float
        Time in seconds.

    Returns
    -------
    time_string : str
        Pretty time representation as a string.

    Examples
    --------
    >>> pretty_time(30)
    '30.00s'
    >>> pretty_time(76)
    '1m:16s'
    >>> pretty_time(4343)
    '1h:12m:23s'
    """
    seconds = time_in_seconds
    minutes = int(seconds) // 60
    seconds = int(round(seconds % 60))
    hours = minutes // 60
    minutes %= 60
    if hours > 0:
        return '%sh:%02dm:%02ds' % (hours, minutes, seconds)
    if minutes > 0:
        return '%sm:%02ds' % (minutes, seconds)
    return '%.2fs' % time_in_seconds
