def find_total_turns(total_data, start_point, end_point, total_train): """ Take total data and proceeding find the smallest turn. """ from routing import Routing ls_instance = setup_all_lines(total_data) path = Routing() path.ls_lines = ls_instance setup_state(path.all_train_history, total_train, start_point) return path.find_smallest_turn()