code: def join_images(img_files, out_file):
      
      images = [PIL.Image.open(f) for f in img_files]
      joined = PIL.Image.new(
          'RGB',
          (sum(i.size[0] for i in images), max(i.size[1] for i in images))
      )
      left = 0
      for img in images:
          joined.paste(im=img, box=(left, 0))
          left = left + img.size[0]
      joined.save(out_file)
docs: Join the list of images into the out file