def GetLastSupportedIphoneSimType(os_version):
    '"Gets the last supported iPhone simulator type of the given OS version.\n\n  Currently, the last supported iPhone simulator type is the last iPhone from\n  the output of `xcrun simctl list devicetypes`.\n\n  Args:\n    os_version: string, OS version of the new simulator. The format is\n      {major}.{minor}, such as 9.3, 10.2.\n\n  Returns:\n    a string, the last supported iPhone simulator type.\n\n  Raises:\n    ios_errors.SimError: when there is no supported iPhone simulator type.\n  '
    supported_sim_types = GetSupportedSimDeviceTypes(ios_constants.OS.IOS)
    supported_sim_types.reverse()
    os_version_float = float(os_version)
    for sim_type in supported_sim_types:
        if sim_type.startswith('iPhone'):
            min_os_version_float = float(simtype_profile.SimTypeProfile(sim_type).min_os_version)
            if (os_version_float >= min_os_version_float):
                return sim_type
    raise ios_errors.SimError('Can not find supported iPhone simulator type.')
"Gets the last supported iPhone simulator type of the given OS version.

Currently, the last supported iPhone simulator type is the last iPhone from
the output of `xcrun simctl list devicetypes`.

Args:
  os_version: string, OS version of the new simulator. The format is
    {major}.{minor}, such as 9.3, 10.2.

Returns:
  a string, the last supported iPhone simulator type.

Raises:
  ios_errors.SimError: when there is no supported iPhone simulator type.
def GetLastSupportedIphoneSimType(os_version):
    '"Gets the last supported iPhone simulator type of the given OS version.\n\n  Currently, the last supported iPhone simulator type is the last iPhone from\n  the output of `xcrun simctl list devicetypes`.\n\n  Args:\n    os_version: string, OS version of the new simulator. The format is\n      {major}.{minor}, such as 9.3, 10.2.\n\n  Returns:\n    a string, the last supported iPhone simulator type.\n\n  Raises:\n    ios_errors.SimError: when there is no supported iPhone simulator type.\n  '
    supported_sim_types = GetSupportedSimDeviceTypes(ios_constants.OS.IOS)
    supported_sim_types.reverse()
    os_version_float = float(os_version)
    for sim_type in supported_sim_types:
        if sim_type.startswith('iPhone'):
            min_os_version_float = float(simtype_profile.SimTypeProfile(sim_type).min_os_version)
            if (os_version_float >= min_os_version_float):
                return sim_type
    raise ios_errors.SimError('Can not find supported iPhone simulator type.')