def copy(self, retain_contents=True):
        clone = copy.copy(self)
        if not retain_contents:
            clone._atomdetails_by_id = {}
        else:
            clone._atomdetails_by_id = self._atomdetails_by_id.copy()
        if self.meta:
            clone.meta = self.meta.copy()
        return clone
Test resource/mongo_search endpoint
dataset/ETHPy150Open openstack/taskflow/taskflow/persistence/models.py/FlowDetail.copy--crossover with--dataset/ETHPy150Open girder/girder/plugins/mongo_search/plugin_tests/search_test.py/MongoSearchTestCase.testMongoSearch