'Get all loaded tools associated by lineage to the tool whose id is tool_id.'

def get_loaded_tools_by_lineage(self, tool_id):

    tool_lineage = self._lineage_map.get(tool_id)
    if tool_lineage:
        lineage_tool_versions = tool_lineage.get_versions()
        available_tool_versions = []
        for lineage_tool_version in lineage_tool_versions:
            tool = self._tool_from_lineage_version(lineage_tool_version)
            if tool:
                available_tool_versions.append(tool)
        return available_tool_versions
    elif (tool_id in self._tools_by_id):
        tool = self._tools_by_id[tool_id]
        return [tool]
    return []
