def get_vertical_and_horizontal(lines):
<EOL>vertical_lines = sorted(<EOL>[e for e in lines if e[<NUM_LIT:1>] == e[<NUM_LIT:3>]], key=lambda tup: (tup[<NUM_LIT:1>], tup[<NUM_LIT:0>])<EOL>)<EOL>horitontal_lines = sorted([e for e in lines if e[<NUM_LIT:0>] == e[<NUM_LIT:2>]])<EOL>if len(vertical_lines) > <NUM_LIT:0>:<EOL><INDENT>vertical_lines = merge_vertical_lines(vertical_lines)<EOL><DEDENT>if len(horitontal_lines) > <NUM_LIT:0>:<EOL><INDENT>horitontal_lines = merge_horizontal_lines(horitontal_lines)<EOL><DEDENT>return vertical_lines, horitontal_lines<EOL>
Extracts vertical and horizontal lines lists
:param lines: list of lines coordinates
:return: vertical_lines, horitontal_lines (2 lists of coordinates)