import re


def extract_mpn_id(seqIdString):
    """
    For special case of Mycoplasma pneumoniae sequences: grep the correct sequence
    id and return id (mpn tag), sequence and Bio_object.
    
    Example: print(string,"-->",extract_mpn_id('NP_109863.1|MPN-175|DNA's))
    """
    seqId = ''
    regex1 = re.compile(r'(MPN[\w.-]+)(\||$)')
    seqIdSearch = re.search(regex1,seqIdString)
    if seqIdSearch:
        seqId = seqIdSearch.group(1)
    return seqId