    def copy(self, deep: bool = False):
        """
        Copy a DataCollection.

        Examples:
            >>> from towhee.runtime.data_queue import DataQueue, ColumnType
            >>> from towhee.datacollection.data_collection import DataCollection
            >>> dq = DataQueue([('a', ColumnType.SCALAR), ('b', ColumnType.QUEUE)])
            >>> dq.put(('a', 'b1'))
            True
            >>> dc = DataCollection(dq)
            >>> dc_copy = dc.copy()
            >>> dc_dcopy = dc.copy(True)
            >>> id(dc) == id(dc_copy)
            False
            >>> id(dc[0]) == id(dc_copy[0])
            True
            >>> id(dc) == id(dc_dcopy)
            False
            >>> id(dc[0]) == id(dc_dcopy[0])
            False
        """
        if deep:
            return copy.deepcopy(self)
        else:
            return copy.copy(self)
Copy a DataCollection.

Examples:
>>> from towhee.runtime.data_queue import DataQueue, ColumnType
>>> from towhee.datacollection.data_collection import DataCollection
>>> dq = DataQueue([('a', ColumnType.SCALAR), ('b', ColumnType.QUEUE)])
>>> dq.put(('a', 'b1'))
True
>>> dc = DataCollection(dq)
>>> dc_copy = dc.copy()
>>> dc_dcopy = dc.copy(True)
>>> id(dc) == id(dc_copy)
False
>>> id(dc[0]) == id(dc_copy[0])
True
>>> id(dc) == id(dc_dcopy)
False
>>> id(dc[0]) == id(dc_dcopy[0])
False
towhee/datacollection/data_collection.py