@classmethod<EOL><INDENT>def check_ranges(cls, ranges, length):<DEDENT>
result = []<EOL>for start, end in ranges:<EOL><INDENT>if isinstance(start, int) or isinstance(end, int):<EOL><INDENT>if isinstance(start, int) and not (<NUM_LIT:0> <= start < length):<EOL><INDENT>continue<EOL><DEDENT>elif isinstance(start, int) and isinstance(end, int) and not (start <= end):<EOL><INDENT>continue<EOL><DEDENT>elif start is None and end == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>result.append( (start,end) )<EOL><DEDENT><DEDENT>return result<EOL>
Removes errored ranges