code: def get_image_output(self, arch):
          
  
          saved_image = self.workflow.exported_image_sequence[-1].get('path')
          image_name = get_image_upload_filename(self.workflow.exported_image_sequence[-1],
                                                 self.workflow.builder.image_id,
                                                 arch)
          if self.metadata_only:
              metadata = self.get_output_metadata(os.path.devnull, image_name)
              output = Output(file=None, metadata=metadata)
          else:
              metadata = self.get_output_metadata(saved_image, image_name)
              output = Output(file=open(saved_image), metadata=metadata)
  
          return metadata, output
docs: Create the output for the image
  
          This is the Koji Content Generator metadata, along with the
          'docker save' output to upload.
  
          For metadata-only builds, an empty file is used instead of the
          output of 'docker save'.
  
          :param arch: str, architecture for this output
          :return: tuple, (metadata dict, Output instance)