def determine_stable_version(version_list):
 versions = sort_versions(version_list)
 versions = [(version_obj, comparable) for (version_obj, comparable) in versions if (not comparable.is_prerelease)]
 if versions:
  (version_obj, comparable) = versions[0]
  return version_obj
 else:
  return None

def determine_stable_version ( version_list ) : versions = sort_versions ( version_list ) versions = [ ( version_obj , comparable ) for ( version_obj , comparable ) in versions if ( not comparable . is_prerelease ) ] if versions : ( version_obj , comparable ) = versions [ 0 ] return version_obj else : return None
determine a stable version for version list takes a list of version model instances and returns the version instance which can be considered the most recent stable one .