code: def collide2(cls, data, params):
          
          data, width = cls._collide_setup(data, params)
          if params.get('width', None) is None:
              params['width'] = width
  
          # Reorder by x position then on group, relying on stable sort to
          # preserve existing ordering. The default stacking order reverses
          # the group in order to match the legend order.
          if params and 'reverse' in params and params['reverse']:
              data['-group'] = -data['group']
              idx = data.sort_values(
                  ['x', '-group'], kind='mergesort').index
              del data['-group']
          else:
              idx = data.sort_values(
                  ['x', 'group'], kind='mergesort').index
  
          data = data.loc[idx, :]
          data.reset_index(inplace=True, drop=True)
          return cls.strategy(data, params)
docs: Calculate boundaries of geometry object
  
          Uses Strategy