def get_pyserial_version(self, pyserial_version):
        version = 3.0
        m = self.re_float.search(pyserial_version)
        if m:
            try:
                version = float(m.group(0))
            except ValueError:
                version = 3.0   # We will assume you've got latest (3.0+)
        return version
! Retrieve pyserial module version
dataset/ETHPy150Open ARMmbed/htrun/mbed_host_tests/host_tests_plugins/module_reset_mbed.py/HostTestPluginResetMethod_Mbed.get_pyserial_version