def write_hpvm_configs(header: str, configs: Iterable[Config], to_file: PathLike):
    text_segs = ([header] + [str(config) for config in configs])
    with open(to_file, 'w') as f:
        f.write('\n'.join(text_segs))
        f.flush()
def write_hpvm_configs(header: str, configs: Iterable[Config], to_file: PathLike):
    text_segs = ([header] + [str(config) for config in configs])
    with open(to_file, 'w') as f:
        f.write('\n'.join(text_segs))
        f.flush()