'Take a tool id - potentially from a different Galaxy instance or that
is no longer loaded - and find the closest match to the currently loaded
tools (using get_tool for inexact matches which currently returns the oldest
tool shed installed tool with the same short id).'

def get_tool_id(self, tool_id):

    if (tool_id not in self._tools_by_id):
        tool = self.get_tool(tool_id)
        if tool:
            tool_id = tool.id
        else:
            tool_id = None
    return tool_id
