hunk.code_window:   }
     updateDataTree(
       unEvalTree: DataTree,
     ): {
       dataTree: DataTree;
       updates: Diff<DataTree, DataTree>[];
       evaluationOrder: string[];
       unEvalUpdates: DataTreeDiff[];
     } {
       const oldEvalTree = _.cloneDeep(this.evalTree);
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.file_path: app/client/src/workers/DataTreeEvaluator.ts
hunk.type: replace
file: import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
  import { applyChange, Diff } from "deep-diff";
  import { DataTree } from "entities/DataTree/dataTreeFactory";
  import { createImmerReducer } from "utils/AppsmithUtils";
  import * as Sentry from "@sentry/react";
  import log from "loglevel";
  
  export type EvaluatedTreeState = DataTree;
  
  const initialState: EvaluatedTreeState = {};
  
  const evaluatedTreeReducer = createImmerReducer(initialState, {
    [ReduxActionTypes.SET_EVALUATED_TREE]: (
      state: EvaluatedTreeState,
      action: ReduxAction<{
        dataTree: DataTree;
        updates: Diff<DataTree, DataTree>[];
        removedPaths: [string];
      }>,
    ) => {
      const { dataTree, updates } = action.payload;
      if (Object.keys(dataTree).length) {
        return dataTree;
      }
      for (const update of updates) {
        // Null check for typescript
        if (!Array.isArray(update.path) || update.path.length === 0) {
          continue;
        }
        try {
          applyChange(state, undefined, update);
        } catch (e) {
          log.error(e);
          Sentry.captureException(e, {
            extra: {
              update,
              updateLength: updates.length,
            },
          });
        }
      }
    },
    [ReduxActionTypes.FETCH_PAGE_INIT]: () => initialState,
  });
  
  export default evaluatedTreeReducer;
  