<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def area(self, cc_index=None):
 """ Returns the area of the selected polygon if index is provided or of all polygons if it's not. """

        if cc_index is not None:
            return self.areas[cc_index]
        return np.sum(self.areas)