def apt_add_repository_from_apt_string(apt_string, apt_file):
apt_file_path = '<STR_LIT>' % apt_file<EOL>if not file_contains(apt_file_path, apt_string.lower(), use_sudo=True):<EOL><INDENT>file_append(apt_file_path, apt_string.lower(), use_sudo=True)<EOL>with hide('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>sudo("<STR_LIT>")<EOL><DEDENT><DEDENT>
adds a new repository file for apt