code: def grid(self, dimensions=None, **kwargs):
          
          dimensions = self._valid_dimensions(dimensions)
          if len(dimensions) == self.ndims:
              with item_check(False):
                  return GridSpace(self, **kwargs).reindex(dimensions)
          return self.groupby(dimensions, container_type=GridSpace, **kwargs)
docs: Group by supplied dimension(s) and lay out groups in grid
  
          Groups data by supplied dimension(s) laying the groups along
          the dimension(s) out in a GridSpace.
  
          Args:
          dimensions: Dimension/str or list
              Dimension or list of dimensions to group by
  
          Returns:
              GridSpace with supplied dimensions