This method is used in DagFileProcessor.process_file - it may be easier to migrate all it's internal calls instead of the whole method.
#
#
#
from __future__ import annotations
import hashlib
import importlib
import importlib.machinery
import importlib.util
import os
import sys
import textwrap