docs: private DataSegment replaceWithExistingSegmentIfPresent(DataSegment segment)
    {
      DruidDataSource dataSource = Optional.ofNullable(dataSources).map(m -> m.get(segment.getDataSource())).orElse(null);
      if (dataSource == null) {
        return segment;
      }
      DataSegment alreadyExistingSegment = dataSource.getSegment(segment.getId());
      return alreadyExistingSegment != null ? alreadyExistingSegment : segment;
    }