code: def parse_xml(filepath):
      extension = os.path.splitext(filepath)[1]
      if extension == ".gz":
          with gzip.open(filepath, "r") as f:
              return ET.parse(f)
      else:
          return ET.parse(filepath)
  
imports: import parlai.core.build_data
  import glob
  import gzip
  import multiprocessing
  import os
  import re
  import sys
  import time
  import tqdm
  import xml.etree.ElementTree
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
label_desc: Use image node_id 3 for calling a global function with example usage: parse_xml(filepath) and returns: ET, ET