def get_edxml_with_aws_urls(self):
edxml = self.get_text().text<EOL>soup = BeautifulSoup(edxml, '<STR_LIT>').find('<STR_LIT:html>')<EOL>if soup is None:<EOL><INDENT>soup = BeautifulSoup('<STR_LIT>', '<STR_LIT>')<EOL>soup.append(BeautifulSoup(edxml, '<STR_LIT>'))<EOL><DEDENT>attrs = {<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT:src>'],<EOL>'<STR_LIT:a>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT:src>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT:url>']<EOL>}<EOL>for key, attributes in attrs.items():<EOL><INDENT>for attr in attributes:<EOL><INDENT>local_regex = re.compile('<STR_LIT>')<EOL>search = {attr: local_regex}<EOL>tags = soup.find_all(**search)<EOL>for item in tags:<EOL><INDENT>asset_id = item[attr]<EOL>asset_content = self._get_asset_content(Id(asset_id))<EOL>item[attr] = asset_content.get_url()<EOL><DEDENT><DEDENT><DEDENT>if '<STR_LIT>' in edxml:<EOL><INDENT>return soup.find('<STR_LIT>').prettify()<EOL><DEDENT>elif '<STR_LIT>' in edxml:<EOL><INDENT>return soup.find('<STR_LIT>').prettify()<EOL><DEDENT>elif '<STR_LIT>' in edxml:<EOL><INDENT>return soup.find('<STR_LIT>').prettify()<EOL><DEDENT>else:<EOL><INDENT>return soup.prettify()<EOL><DEDENT>
stub