def METHOD_NAME(self, input, date):
    # Clear name history if date change
    if self.debatedate != date:
        self.debatedate = date
        self.cleardebatehistory()
    speakeroffice = ''
    office = None
    input = re.sub(' \(Designate\)', '', input)
    METHOD_NAME = re.METHOD_NAME('(.*) \((.*?)\)\s*$', input)
    if METHOD_NAME:
        office = METHOD_NAME.group(1)
        speakeroffice = ' speakeroffice="%s"' % office
        input = METHOD_NAME.group(2)
    ids = self.fullnametoids(input, date)
    if len(ids) == 0 and METHOD_NAME:
        office = METHOD_NAME.group(2)
        input = METHOD_NAME.group(1)
        speakeroffice = ' speakeroffice="%s"' % office
        ids = self.fullnametoids(input, date)
    officeids = self.debateofficehistory.get(input, None)
    if officeids and len(ids) == 0:
        ids = officeids
    if office:
        self.debateofficehistory.setdefault(office, set()).update(ids)
    if len(ids) == 0:
        if not re.search('Some Members|A Member|Several Members|Members', input):
            # import pdb;pdb.set_trace()
            raise ContextException("No matches %s" % (input))
        return None, 'person_id="unknown" error="No match" speakername="%s"' % (input)
    if len(ids) > 1 and 'uk.org.publicwhip/member/90355' in ids:
        # Special case for 8th May, when Mr Hay becomes Speaker
        if input == 'Mr Hay':
            ids.remove('uk.org.publicwhip/member/90355')
        elif input == 'Mr Speaker':
            ids.remove('uk.org.publicwhip/member/90287')
        else:
            raise ContextException('Problem with Mr Hay!')
    elif len(ids) > 1 and 'uk.org.publicwhip/member/90449' in ids:
        # Special case for 2015-01-12, when Mr McLaughlin becomes Speaker
        if input == 'Mr Mitchel McLaughlin':
            ids.remove('uk.org.publicwhip/member/90497')
        elif input == 'Mr Principal Deputy Speaker':
            ids.remove('uk.org.publicwhip/member/90497')
        elif input == 'Mr Speaker':
            ids.remove('uk.org.publicwhip/member/90449')
        else:
            raise ContextException('Problem with Mr McLaughlin! Got "%s"' % input)
    elif len(ids) > 1:
        names = ""
        for id in ids:
            name = self.name_on_date(self.membertoperson(id), date)
            names += '%s %s (%s) ' % (id, name, self.members[id]["constituency"])
        raise ContextException("Multiple matches %s, possibles are %s" % (input, names))
        return None, 'person_id="unknown" error="Matched multiple times" speakername="%s"' % (input)
    for id in ids:
        pass
    person_id = self.membertoperson(id)
    remadename = self.name_on_date(person_id, date)
    if self.members[id]["party"] == "Speaker" and re.search("Speaker", input):
        remadename = input
    return person_id, 'person_id="%s" speakername="%s"%s' % (person_id, remadename, speakeroffice)