def __optimize(self):
ret = []<EOL>for (begin, end) in sorted(self.__has):<EOL><INDENT>if ret and begin <= ret[-<NUM_LIT:1>][<NUM_LIT:1>] < end: <EOL><INDENT>ret[-<NUM_LIT:1>] = (ret[-<NUM_LIT:1>][<NUM_LIT:0>], end)<EOL><DEDENT>elif not ret or begin > ret[-<NUM_LIT:1>][<NUM_LIT:1>]:<EOL><INDENT>ret.append( (begin, end) )<EOL><DEDENT><DEDENT>self.__has = set(ret)<EOL>
Merge overlapping or contacting subranges from ``self.__has`` attribute and update it. Called from all methods
that modify object contents.

Returns
-------
None
    Method does not return. It does internal modifications on ``self.__has`` attribute.