parameters: (
      for_version: APIVersion, values: Dict[str, float]
  )
return_statement: return last
docstring: 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``
docstring_summary: 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``
docstring_tokens: 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
function: 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
function_tokens: 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