def _extract_nexe(program_path, processed_images, command):
    with open(program_path, 'w') as program_fp:
        for zvm_image, _, _ in processed_images:
            try:
                tf = tarfile.open(zvm_image)
                nexe_fp = tf.extractfile(command)
                # once we've found the nexe the user wants to run,
                # we're done
                program_fp.write(nexe_fp.read())
                return program_path
            except KeyError:
                # program not found in this image,
                # go to the next and keep searching
                pass
            finally:
                tf.close()
Given a `command`, search through the listed tar images
dataset/ETHPy150Open zerovm/zerovm-cli/zvshlib/zvsh.py/_extract_nexe