Use C library for YAML loading and dumping
Instead of yaml.safe_load_all, we should do something like:
import yaml
try:
from yaml import CSafeLoader as SafeLoader
except ImportError:
from yaml import SafeLoader
yaml.load_all(pipeline_run_file, Loader=SafeLoader)