code: def tool_builder(component, key, tool_map, *args):
      
      # pylint: disable=protected-access
      tool_name = component.get(key)
      if tool_name:
          tool_fn = tool_map.get(tool_name)
          if tool_fn:
              return tool_fn[0](*args)
          raise Exception("Unknown {} '{}' for {}".format(key, tool_name, component.name))
      raise MissingToolKey(key, component)
docs: This helper function initializes a tool with the given args.