def remove_version_from_guid(guid):
 if ('/repos/' not in guid):
  return None
 last_slash = guid.rfind('/')
 return guid[:last_slash]

def remove_version_from_guid ( guid ) : if ( '/repos/' not in guid ) : return None last_slash = guid . rfind ( '/' ) return guid [ : last_slash ]
removes version from toolshed-derived tool_id .