(
    for_version: APIVersion, values: Dict[str, float]
)
return last
Parse a dict that looks like
    {"2.0": 5,
    "2.5": 4}
    (aka the flow rate values from pipette config) and return the value for
    the highest api level that is at or underneath ``for_version``
Parse a dict that looks like
    {"2.0": 5,
    "2.5": 4}
    (aka the flow rate values from pipette config) and return the value for
    the highest api level that is at or underneath ``for_version``
Parse a dict that looks like { 2 . 0 : 5 2 . 5 : 4 } ( aka the flow rate values from pipette config ) and return the value for the highest api level that is at or underneath for_version
def _find_value_for_api_version(
    for_version: APIVersion, values: Dict[str, float]
) -> float:
    """
    Parse a dict that looks like
    {"2.0": 5,
    "2.5": 4}
    (aka the flow rate values from pipette config) and return the value for
    the highest api level that is at or underneath ``for_version``
    """
    sorted_versions = sorted({APIVersion.from_string(k): v for k, v in values.items()})
    last = values[str(sorted_versions[0])]
    for version in sorted_versions:
        if version > for_version:
            break
        last = values[str(version)]
    return last
def _find_value_for_api_version ( for_version : APIVersion , values : Dict [ str , float ] ) -> float : sorted_versions = sorted ( { APIVersion . from_string ( k ) : v for k , v in values . items ( ) } ) last = values [ str ( sorted_versions [ 0 ] ) ] for version in sorted_versions : if version > for_version : break last = values [ str ( version ) ] return last