code: def check_metrics_aligned(directory1, directory2):
      data1 = load_pickles(directory1)
      data2 = load_pickles(directory2)
      assert len(data1) == len(data2)
  
      # Check that the metrics are aligned.
      for i in range(len(data1)):
          if data1[i] != data2[i]:
              print(
                  "Metrics are not aligned for experience {}".format(i)
              )
              sys.exit(1)
  
      print("Metrics are aligned")
  
imports: import os
  import pickle
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: check_metrics_aligned(directory1, directory2) without return types