def __deepcopy__(self, memo):
        sys.setrecursionlimit(5000)  # TODO fix this in a better way
        cls = self.__class__
        result = cls.__new__(cls)
        memo[id(self)] = result

        for k, v in list(self.__dict__.items()):
            if k not in ('user_defined_macros', 'params'):
                setattr(result, k, copy.deepcopy(v, memo))
        result.params = self.params
        if hasattr(self, 'user_defined_macros'):
            result.user_defined_macros = self.user_defined_macros
        return result
Hack sorting double chained task lists by task_id to avoid hitting
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/BaseOperator.__deepcopy__