class_docstr: The CubeInterface provides allows HoloViews to interact with iris
  Cube data. When passing an iris Cube to a HoloViews Element the
  init method will infer the dimensions of the Cube from its
  coordinates. Currently the interface only provides the basic
  methods required for HoloViews to work with an object.
class_docstr_tok: ["The","CubeInterface","provides","allows","HoloViews","to","interact","with","iris","Cube","data",".","When","passing","an","iris","Cube","to","a","HoloViews","Element","the","init","method","will","infer","the","dimensions","of","the","Cube","from","its","coordinates",".","Currently","the","interface","only","provides","the","basic","methods","required","for","HoloViews","to","work","with","an","object","."]
docstr: Groups the data by one or more dimensions returning a container
  indexed by the grouped dimensions containing slices of the
  cube wrapped in the group_type. This makes it very easy to
  break up a high-dimensional dataset into smaller viewable chunks.
docstr_tok: ["Groups","the","data","by","one","or","more","dimensions","returning","a","container","indexed","by","the","grouped","dimensions","containing","slices","of","the","cube","wrapped","in","the","group_type",".","This","makes","it","very","easy","to","break","up","a","high-dimensional","dataset","into","smaller","viewable","chunks","."]
code: def groupby(
      cls,
      dataset,
      dims,
      container_type=HoloMap,
      group_type=None,
      **kwargs,
  ):
      """
      Groups the data by one or more dimensions returning a container
      indexed by the grouped dimensions containing slices of the
      cube wrapped in the group_type. This makes it very easy to
      break up a high-dimensional dataset into smaller viewable chunks.
      """
      import iris
  
      if not isinstance(dims, list):
          dims = [dims]
      dims = [dataset.get_dimension(d, strict=True) for d in dims]
      constraints = [d.name for d in dims]
      slice_dims = [d for d in dataset.kdims if d not in dims]
  
      # Update the kwargs appropriately for Element group types
      group_kwargs = {}
      group_type = dict if group_type == "raw" else group_type
      if issubclass(group_type, Element):
          group_kwargs.update(util.get_param_values(dataset))
          group_kwargs["kdims"] = slice_dims
      group_kwargs.update(kwargs)
  
      drop_dim = any(d not in group_kwargs["kdims"] for d in slice_dims)
  
      unique_coords = product(
          *[cls.values(dataset, d, expanded=False) for d in dims]
      )
      data = []
      for key in unique_coords:
          constraint = iris.Constraint(**dict(zip(constraints, key)))
          extracted = dataset.data.extract(constraint)
          if drop_dim:
              extracted = group_type(
                  extracted, kdims=slice_dims, vdims=dataset.vdims
              ).columns()
          cube = group_type(extracted, **group_kwargs)
          data.append((key, cube))
      if issubclass(container_type, NdMapping):
          with item_check(False), sorted_context(False):
              return container_type(data, kdims=dims)
      else:
          return container_type(data)
  
imports: import sys
  import datetime
  from itertools import product
  import numpy
  from holoviews.core.data import Dataset
  from holoviews.core.data.interface import Interface, DataError
  from holoviews.core.data.grid import GridInterface
  from holoviews.core.dimension import Dimension, asdim
  from holoviews.core.element import Element
  from holoviews.core.ndmapping import NdMapping, item_check, sorted_context
  from holoviews.core.spaces import HoloMap
  from holoviews.core import util
label_desc: Use image node_id 14 for calling the CubeInterface obj's underlying member method code with example usage: obj.groupby(cls, dataset, dims, container_type, group_type) and returns: container_type, container_type