<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maskAt(self, index):
 """ Returns the mask at the index. It the mask is a boolean it is returned since this boolean representes the mask for all array elements. """

        if isinstance(self.mask, bool):
            return self.mask
        else:
            return self.mask[index]