code: def shrink(self, src, width=0, max_value=0, filter_method=None,
                 path=None, flags=0):
          
          if filter_method:
              get_ = _madoka.Sketch_get__
              set_ = _madoka.Sketch_set__
              new_sketch = Sketch(width, max_value, path, flags, src.seed)
              for table_id in range(SKETCH_DEPTH):
                  for offset in range(width, src.width, width):
                      for cell_id in range(width):
                          val = get_(src, table_id, offset + cell_id)
                          val = filter_method(val)
                          val = max_value if val > max_value else val
                          if val > get_(new_sketch, table_id, cell_id):
                              set_(new_sketch, table_id, cell_id, val)
              self.swap(new_sketch)
          else:
              _madoka.Sketch_shrink(self, src, width, max_value, None, path, flags)
docs: Shrink sketch
          Params:
              <Sketch> src_sketch
              <int> width
              <int> max_value
              <lambda> | <function> filter
              <str> path
              <int> flags