def _get_file_prefix(name_arr, prefix):
    """Get the prefix of the output files based on the ID."""
    if prefix is None:
        return ["{:s}".format(str(name)) for name in name_arr]
    else:
        return ["{:s}_{:s}".format(prefix, str(name)) for name in name_arr]