def postprocess_funding(self, entry):
        """
        Separates funding agency from grant numbers.
        """

        if type(entry.funding) not in [str, unicode]:
            return

        sources = [fu.strip() for fu in entry.funding.split(';')]
        sources_processed = []
        for source in sources:
            m = re.search('(.*)?\s+\[(.+)\]', source)
            if m:
                agency, grant = m.groups()
            else:
                agency, grant = source, None
            sources_processed.append((agency, grant))
        entry.funding = sources_processed
def postprocess_funding ( self , entry ) : if type ( entry . funding ) not in [ str , unicode ] : return sources = [ fu . strip ( ) for fu in entry . funding . split ( ';' ) ] sources_processed = [ ] for source in sources : m = re . search ( '(.*)?\s+\[(.+)\]' , source ) if m : agency , grant = m . groups ( ) else : agency , grant = source , None sources_processed . append ( ( agency , grant ) ) entry . funding = sources_processed
Separates funding agency from grant numbers.