'Retrieve all loaded versions of a tool from the toolbox and return a select list enabling
selection of a different version, the list of the tool\'s loaded versions, and the specified tool.'

def get_tool_components(self, tool_id, tool_version=None, get_loaded_tools_by_lineage=False, set_selected=False):

    toolbox = self
    tool_version_select_field = None
    tools = []
    tool = None
    tool_ids = listify(tool_id)
    for tool_id in tool_ids:
        if get_loaded_tools_by_lineage:
            tools = toolbox.get_loaded_tools_by_lineage(tool_id)
        else:
            tools = toolbox.get_tool(tool_id, tool_version=tool_version, get_all_versions=True)
        if tools:
            tool = toolbox.get_tool(tool_id, tool_version=tool_version, get_all_versions=False)
            if (len(tools) > 1):
                tool_version_select_field = self.__build_tool_version_select_field(tools, tool.id, set_selected)
            break
    return (tool_version_select_field, tools, tool)
