docs: def __optimize(self):
  
          """
          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.
          """
  
          ret = []
  
          for (begin, end) in sorted(self.__has):
  
              if ret and begin <= ret[-1][1] < end: # when current range overlaps with the last one from ret
                  ret[-1] = (ret[-1][0], end)
              elif not ret or begin > ret[-1][1]:
                  ret.append( (begin, end) )
  
          self.__has = set(ret)