def METHOD_NAME(child):
    global source_list
    global source_ext
    # print child
    full_path = child.rfile().abspath
    file_type_list  = full_path.rsplit('.',1)
    #print file_type
    if (len(file_type_list) > 1):
        file_type = full_path.rsplit('.',1)[1]
        if file_type in source_ext:
            if full_path not in source_list:
                source_list.append(full_path)
    children = child.all_children()
    if children != []:
        for item in children:
            METHOD_NAME(item)