code: def reduce(cls, dataset, reduce_dims, function, **kwargs):
      kdims = [
          kdim for kdim in dataset.kdims if kdim not in reduce_dims
      ]
      return cls.aggregate(dataset, kdims, function, **kwargs)
  
imports: import sys
  import warnings
  import numpy
  import param
  from ..None import util
  from ..element import Element
  from ..ndmapping import NdMapping
  from .util import finite_range
label_desc: Use image node_id 20 for calling the Interface obj's underlying member method code with example usage: obj.reduce(cls, dataset, reduce_dims, function) and returns: cls