'Load a single tool from the file named by `config_file` and return an instance of `Tool`.'

def load_tool(self, config_file, guid=None, repository_id=None, use_cached=False, **kwds):

    tool = None
    if use_cached:
        tool = self.load_tool_from_cache(config_file)
    if (not tool):
        tool = self.create_tool(config_file=config_file, repository_id=repository_id, guid=guid, **kwds)
        if (tool.tool_shed_repository or (not guid)):
            self.add_tool_to_cache(tool, config_file)
    if ((not tool.id.startswith('__')) and self._tool_watcher):
        self._tool_watcher.watch_file(config_file, tool.id)
    return tool
