from bs4 import BeautifulSoup


def parse_meta(meta):
    """Parse out the N50, etc. from the XML in the "Meta" tag."""
    soup = BeautifulSoup(meta, 'html5lib')
    return dict([(s['category'], int(s.text)) for s in soup.find_all('stat') if s['sequence_tag'] == 'all'])