@staticmethod<EOL><INDENT>def _distinct(row1, row2):<DEDENT>
relation = Allen.relation(row1[<NUM_LIT:0>], row1[<NUM_LIT:1>], row2[<NUM_LIT:0>], row2[<NUM_LIT:1>])<EOL>if relation is None:<EOL><INDENT>return []<EOL><DEDENT>if relation == Allen.X_BEFORE_Y:<EOL><INDENT>return None  <EOL><DEDENT>if relation == Allen.X_BEFORE_Y_INVERSE:<EOL><INDENT>return None  <EOL><DEDENT>if relation == Allen.X_MEETS_Y:<EOL><INDENT>return None  <EOL><DEDENT>if relation == Allen.X_MEETS_Y_INVERSE:<EOL><INDENT>return None  <EOL><DEDENT>if relation == Allen.X_OVERLAPS_WITH_Y:<EOL><INDENT>return [(row1[<NUM_LIT:0>], row2[<NUM_LIT:0>] - <NUM_LIT:1>), (row2[<NUM_LIT:0>], row1[<NUM_LIT:1>]), (row1[<NUM_LIT:1>] + <NUM_LIT:1>, row2[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_OVERLAPS_WITH_Y_INVERSE:<EOL><INDENT>return [(row2[<NUM_LIT:0>], row1[<NUM_LIT:0>] - <NUM_LIT:1>), (row1[<NUM_LIT:0>], row2[<NUM_LIT:1>]), (row2[<NUM_LIT:1>] + <NUM_LIT:1>, row1[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_STARTS_Y:<EOL><INDENT>return [(row1[<NUM_LIT:0>], row1[<NUM_LIT:1>]), (row1[<NUM_LIT:1>] + <NUM_LIT:1>, row2[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_STARTS_Y_INVERSE:<EOL><INDENT>return [(row2[<NUM_LIT:0>], row2[<NUM_LIT:1>]), (row2[<NUM_LIT:1>] + <NUM_LIT:1>, row1[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_DURING_Y:<EOL><INDENT>return [(row2[<NUM_LIT:0>], row1[<NUM_LIT:0>] - <NUM_LIT:1>), (row1[<NUM_LIT:0>], row1[<NUM_LIT:1>]), (row1[<NUM_LIT:1>] + <NUM_LIT:1>, row2[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_DURING_Y_INVERSE:<EOL><INDENT>return [(row1[<NUM_LIT:0>], row2[<NUM_LIT:0>] - <NUM_LIT:1>), (row2[<NUM_LIT:0>], row2[<NUM_LIT:1>]), (row2[<NUM_LIT:1>] + <NUM_LIT:1>, row1[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_FINISHES_Y:<EOL><INDENT>return [(row2[<NUM_LIT:0>], row1[<NUM_LIT:0>] - <NUM_LIT:1>), (row1[<NUM_LIT:0>], row1[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_FINISHES_Y_INVERSE:<EOL><INDENT>return [(row1[<NUM_LIT:0>], row2[<NUM_LIT:0>] - <NUM_LIT:1>), (row2[<NUM_LIT:0>], row2[<NUM_LIT:1>])]<EOL><DEDENT>if relation == Allen.X_EQUAL_Y:<EOL><INDENT>return None  <EOL><DEDENT>raise ValueError('<STR_LIT>'.format(relation))<EOL>
Returns a list of distinct (or none overlapping) intervals if two intervals are overlapping. Returns None if
the two intervals are none overlapping. The list can have 2 or 3 intervals.

:param tuple[int,int] row1: The first interval.
:param tuple[int,int] row2: The second interval.

:rtype: None|list(tuple[int,int])