# Path: modules/pepdata/common.py
# def _prepare_memoization_key(args, kwargs):
# def memoize(fn):
#     def wrapped_fn(*args, **kwargs):
# def int_or_seq(x):
# def dataframe_from_counts(counts):


from collections import namedtuple
from ..common import memoize, cache
import os
import xml
            continue
        name = name_element.text

        synonyms = set([])
        for synonym_element in allele.iterfind("Synonyms"):
            for synonym in synonym_element.text.split(","):
                synonyms.add(synonym.strip())
        mhc_class = mhc_class_element.text
        organism_element = allele.find("Organsim")
        if organism_element is None:
            organism = None
        else:
            organism = organism_element.text

        locus_element = allele.find("Locus")

        if locus_element is None:
            locus = None
        else:
            locus = locus_element.text

        allele_object = Allele(
            name=name,
            mhc_class=mhc_class,
            locus=locus,
            organism=organism,
            synonyms=synonyms)
        result.append(allele_object)
    return result


# Path: modules/pepdata/common.py
# def _prepare_memoization_key(args, kwargs):
# def memoize(fn):
#     def wrapped_fn(*args, **kwargs):
# def int_or_seq(x):
# def dataframe_from_counts(counts):


# Path: modules/pepdata/iedb/alleles.py
from collections import namedtuple
from ..common import memoize, cache
import os
import xml

            continue
        name = name_element.text

        synonyms = set([])
        for synonym_element in allele.iterfind("Synonyms"):
            for synonym in synonym_element.text.split(","):
                synonyms.add(synonym.strip())
        mhc_class = mhc_class_element.text
        organism_element = allele.find("Organsim")
        if organism_element is None:
            organism = None
        else:
            organism = organism_element.text

        locus_element = allele.find("Locus")

        if locus_element is None:
            locus = None
        else:
            locus = locus_element.text

        allele_object = Allele(
            name=name,
            mhc_class=mhc_class,
            locus=locus,
            organism=organism,
            synonyms=synonyms)
        result.append(allele_object)
    return result


@memoize