def last(col):
    idx = col.last_valid_index()
    return (col[idx] if (idx is not None) else None)
def last(col):
    idx = col.last_valid_index()
    return (col[idx] if (idx is not None) else None)