def create_tool(self, task):
gp_tool = dict(taskName=task.name,<EOL>taskDisplayName=task.display_name,<EOL>taskDescription=task.description,<EOL>canRunInBackground=True,<EOL>taskUri=task.uri)<EOL>gp_tool['<STR_LIT>'] = self._execute_template.substitute(gp_tool)<EOL>gp_tool['<STR_LIT>'] = param_builder.create_param_info(task.parameters,<EOL>self.parameter_map)<EOL>gp_tool['<STR_LIT>'] = param_builder.create_update_parameter(task.parameters,<EOL>self.parameter_map)<EOL>gp_tool['<STR_LIT>'] = param_builder.create_pre_execute(task.parameters,<EOL>self.parameter_map)<EOL>gp_tool['<STR_LIT>'] = param_builder.create_post_execute(task.parameters,<EOL>self.parameter_map)<EOL>return self._tool_template.substitute(gp_tool)<EOL>
Creates a new GPTool for the toolbox.