<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_reverse_index(self, base_index):
 """Get index into this segment's data given the index into the base data Raises IndexError if the base index doesn't map to anything in this segment's data """

        r = self.reverse_index_mapping[base_index]
        if r < 0:
            raise IndexError("index %d not mapped in this segment" % base_index)
        return r