def get_sub_districts_data(raw_list):
    sub_districts_list = []
    curr_sub_district = []
    prev_sub_district = []
    for i in range(1, len(raw_list)):
        curr_list = raw_list[i]
        if ((curr_sub_district == []) or (not ((curr_list[0] == None) or (curr_list[0] == '')))):
            if (prev_sub_district != []):
                sub_districts_list.append(curr_sub_district)
            curr_sub_district = curr_list
            prev_sub_district = curr_sub_district
        if ((curr_sub_district[1] == '') and (curr_list[1] != '') and (curr_list[1] != None)):
            curr_sub_district[1] = curr_list[1]
        if ((curr_sub_district[2] == '') and (curr_list[2] != '') and (curr_list[2] != None)):
            curr_sub_district[2] = curr_list[2]
        if (i == (len(raw_list) - 1)):
            sub_districts_list.append(curr_sub_district)
    prev_sub_district = sub_districts_list[0]
    if (((prev_sub_district[1] == '') or (prev_sub_district[1] == None)) and ((prev_sub_district[2] == '') or (prev_sub_district[2] == None))):
        sub_districts_list.pop(0)
    return sub_districts_list
def get_sub_districts_data(raw_list):
    sub_districts_list = []
    curr_sub_district = []
    prev_sub_district = []
    for i in range(1, len(raw_list)):
        curr_list = raw_list[i]
        if ((curr_sub_district == []) or (not ((curr_list[0] == None) or (curr_list[0] == )))):
            if (prev_sub_district != []):
                sub_districts_list.append(curr_sub_district)
            curr_sub_district = curr_list
            prev_sub_district = curr_sub_district
        if ((curr_sub_district[1] == ) and (curr_list[1] != ) and (curr_list[1] != None)):
            curr_sub_district[1] = curr_list[1]
        if ((curr_sub_district[2] == ) and (curr_list[2] != ) and (curr_list[2] != None)):
            curr_sub_district[2] = curr_list[2]
        if (i == (len(raw_list) - 1)):
            sub_districts_list.append(curr_sub_district)
    prev_sub_district = sub_districts_list[0]
    if (((prev_sub_district[1] == ) or (prev_sub_district[1] == None)) and ((prev_sub_district[2] == ) or (prev_sub_district[2] == None))):
        sub_districts_list.pop(0)
    return sub_districts_list