code: def _valid_dimensions(self, dimensions):
          
          if dimensions is None:
              dimensions = self.kdims
          elif not isinstance(dimensions, list):
              dimensions = [dimensions]
  
          valid_dimensions = []
          for dim in dimensions:
              if isinstance(dim, Dimension): dim = dim.name
              if dim not in self.kdims:
                  raise Exception("Supplied dimensions %s not found." % dim)
              valid_dimensions.append(dim)
          return valid_dimensions
docs: Validates key dimension input
  
          Returns kdims if no dimensions are specified