def list_get(input_list, index):
    """Method to get an item from a list that handles out-of bounds errors.

    This method is intended to be used when we are picking items from
    a list and possibly we want a number of items which is larger than
    the number of items in the list. Here, we then just return the last
    element.

    Parameters
    ----------
    input_list : list
        The list to pick from
    index : integer
        The index to pick
    """
    try:
        return input_list[index]
    except IndexError:
        return input_list[-1]
