<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shift_to_the_left(array, dist, pad=True, trim=True):
 """Shift array to the left. :param array: An iterable object. :type array: iterable object :param dist: how far you want to shift :type disk: int :param pad: pad array[-1] to the right. :type pad: boolean (default True) :param trim: trim the first ``#dist`` items. :type trim: boolean (default True) Usage:: [1, 2, 3, 4, 5, 6, 7, 8, 9, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9] [1, 2, 3, 4, 5, 6, 7, 8, 9] Warning, with pad=False and trim=False, no change applied. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] """

    if dist < 0:
        raise ValueError("Shift distance has to greater or equal than 0.")

    if pad:
        if trim:
            new_array = array[dist:] + [array[-1]] * dist
        else:
            new_array = array + [array[-1]] * dist
    else:
        if trim:
            new_array = array[dist:]
        else:
            print("Warning, with pad=False and trim=False, no change applied.")
            new_array = list(array)
    return new_array