def get_components_from_key(key):
 items = key.split(STRSEP)
 toolshed_base_url = items[0]
 repository_name = items[1]
 repository_owner = items[2]
 changeset_revision = items[3]
 if (len(items) == 5):
  prior_installation_required = items[4]
  return (toolshed_base_url, repository_name, repository_owner, changeset_revision, prior_installation_required)
 elif (len(items) == 6):
  prior_installation_required = items[4]
  only_if_compiling_contained_td = items[5]
  return (toolshed_base_url, repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td)
 else:
  return (toolshed_base_url, repository_name, repository_owner, changeset_revision)

def get_components_from_key ( key ) : items = key . split ( STRSEP ) toolshed_base_url = items [ 0 ] repository_name = items [ 1 ] repository_owner = items [ 2 ] changeset_revision = items [ 3 ] if ( len ( items ) == 5 ) : prior_installation_required = items [ 4 ] return ( toolshed_base_url , repository_name , repository_owner , changeset_revision , prior_installation_required ) elif ( len ( items ) == 6 ) : prior_installation_required = items [ 4 ] only_if_compiling_contained_td = items [ 5 ] return ( toolshed_base_url , repository_name , repository_owner , changeset_revision , prior_installation_required , only_if_compiling_contained_td ) else : return ( toolshed_base_url , repository_name , repository_owner , changeset_revision )
assumes tool shed is current tool shed since repository dependencies across tool sheds is not yet supported .