<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy(self, name, exclude_from_current=False, deep_copy=False):
 """ Creates a copy of this cell. Parameters name : string The name of the cell. exclude_from_current : bool If ``True``, the cell will not be included in the global list of cells maintained by ``gdspy``. deep_copy : bool If ``False``, the new cell will contain only references to the existing elements. If ``True``, copies of all elements are also created. Returns ------- out : ``Cell`` The new copy of this cell. """

        new_cell = Cell(name, exclude_from_current)
        if deep_copy:
            new_cell.elements = libCopy.deepcopy(self.elements)
            new_cell.labels = libCopy.deepcopy(self.labels)
            for ref in new_cell.get_dependencies(True):
                if ref._bb_valid:
                    ref._bb_valid = False
        else:
            new_cell.elements = list(self.elements)
            new_cell.labels = list(self.labels)
        return new_cell