def ltrunc(string, width, marker='...'):
    """Truncates a string from the left to be at most 'width' wide.

    Args:
        string: String to truncate.
        width:  Width to make the string at most. May be 0 to not truncate.
        marker: String to use in place of any truncated text.

    Returns:
        Truncated string.
    """
    if width > 0 and len(string) > width:
        return marker + string[-(width-len(marker)):]
    return string