nodes: 0, module; 1, function_definition; 2, function_name:_tidy; 3, parameters; 4, type; 5, block; 6, identifier:self; 7, None; 8, expression_statement; 9, if_statement; 10, comment:"""
          Removes overlaps, etc., and sorts.
          """; 11, attribute; 12, block; 13, else_clause; 14, identifier:self; 15, identifier:no_overlap; 16, expression_statement; 17, comment:# will sort; 18, block; 19, call; 20, expression_statement; 21, attribute; 22, argument_list; 23, call; 24, identifier:self; 25, identifier:remove_overlap; 26, attribute; 27, attribute; 28, argument_list; 29, identifier:self; 30, identifier:no_contiguous; 31, identifier:self; 32, identifier:_sort
code: def _tidy(self) -> None:
          """
          Removes overlaps, etc., and sorts.
          """
          if self.no_overlap:
              self.remove_overlap(self.no_contiguous)  # will sort
          else:
              self._sort()