<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sub_dimension(self, index, dimension, propagate=True, inplace=False):
 """Return a ChemicalEntity sliced through a dimension. If other dimensions depend on this one those are updated accordingly. """

        filter_ = self._propagate_dim(index, dimension, propagate)
        return self.subindex(filter_, inplace)