<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inverse(self):
 """Calculate the inverse geodesic between locations in segments. Returns: list of 2-tuple of float: Groups in bearing and distance between points in segments """

        inverses = []
        for segment in self:
            if len(segment) < 2:
                inverses.append([])
            else:
                inverses.append(segment.inverse())
        return inverses