def _convert_xml_to_block_list(response):
if response is None or response.body is None:<EOL><INDENT>return response<EOL><DEDENT>block_list = BlobBlockList()<EOL>list_element = ETree.fromstring(response.body)<EOL>committed_blocks_element = list_element.find('<STR_LIT>')<EOL>for block_element in committed_blocks_element.findall('<STR_LIT>'):<EOL><INDENT>block_id = _decode_base64_to_text(block_element.findtext('<STR_LIT:Name>', '<STR_LIT>'))<EOL>block_size = int(block_element.findtext('<STR_LIT>'))<EOL>block = BlobBlock(id=block_id, state=BlobBlockState.Committed)<EOL>block._set_size(block_size)<EOL>block_list.committed_blocks.append(block)<EOL><DEDENT>uncommitted_blocks_element = list_element.find('<STR_LIT>')<EOL>for block_element in uncommitted_blocks_element.findall('<STR_LIT>'):<EOL><INDENT>block_id = _decode_base64_to_text(block_element.findtext('<STR_LIT:Name>', '<STR_LIT>'))<EOL>block_size = int(block_element.findtext('<STR_LIT>'))<EOL>block = BlobBlock(id=block_id, state=BlobBlockState.Uncommitted)<EOL>block._set_size(block_size)<EOL>block_list.uncommitted_blocks.append(block)<EOL><DEDENT>return block_list<EOL>
<?xml version="1.0" encoding="utf-8"?>
<BlockList>
  <CommittedBlocks>
     <Block>
        <Name>base64-encoded-block-id</Name>
        <Size>size-in-bytes</Size>
     </Block>
  </CommittedBlocks>
  <UncommittedBlocks>
    <Block>
      <Name>base64-encoded-block-id</Name>
      <Size>size-in-bytes</Size>
    </Block>
  </UncommittedBlocks>
 </BlockList>

Converts xml response to block list class.