<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reindex(self, kdims=[], force=False):
 """Reindexes object dropping static or supplied kdims Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying key dimensions. Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely. Args: kdims (optional):
 New list of key dimensions after reindexing force (bool, optional):
 Whether to drop non-unique items Returns: Reindexed object """

        old_kdims = [d.name for d in self.kdims]
        if not isinstance(kdims, list):
            kdims = [kdims]
        elif not len(kdims):
            kdims = [d for d in old_kdims
                     if not len(set(self.dimension_values(d))) == 1]
        indices = [self.get_dimension_index(el) for el in kdims]

        keys = [tuple(k[i] for i in indices) for k in self.data.keys()]
        reindexed_items = OrderedDict(
            (k, v) for (k, v) in zip(keys, self.data.values()))
        reduced_dims = set([d.name for d in self.kdims]).difference(kdims)
        dimensions = [self.get_dimension(d) for d in kdims
                      if d not in reduced_dims]

        if len(set(keys)) != len(keys) and not force:
            raise Exception("Given dimension labels not sufficient"
                            "to address all values uniquely")

        if len(keys):
            cdims = {self.get_dimension(d): self.dimension_values(d)[0] for d in reduced_dims}
        else:
            cdims = {}
        with item_check(indices == sorted(indices)):
            return self.clone(reindexed_items, kdims=dimensions,
                              cdims=cdims)