def getVersion(self, agent):
        version_end_chars = [';', ')']
        part = agent.partition('Mac OS')[2].strip()
        for c in version_end_chars:
            if c in part:
                version = part.partition(c)[0]
                break
        return version.replace('_', '.')
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/user_agent_parser.py/MacOS.getVersion/original