<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_datatypes(self):
 """ Returns a set of datatypes in this cell. Returns ------- out : set Set of the datatypes used in this cell. """

        datatypes = set()
        for element in self.elements:
            if isinstance(element, PolygonSet):
                datatypes.update(element.datatypes)
            elif isinstance(element, CellReference) or isinstance(
                    element, CellArray):
                datatypes.update(element.ref_cell.get_datatypes())
        return datatypes