def create_param_info(task_params, parameter_map):
gp_params = []<EOL>gp_param_list = []<EOL>gp_param_idx_list = []<EOL>gp_param_idx = <NUM_LIT:0><EOL>for task_param in task_params:<EOL><INDENT>gp_param = {}<EOL>data_type = task_param['<STR_LIT:type>'].upper()<EOL>if '<STR_LIT>' in task_param:<EOL><INDENT>if len(task_param['<STR_LIT>'].split('<STR_LIT:U+002C>')) > <NUM_LIT:1>:<EOL><INDENT>raise UnknownDataTypeError('<STR_LIT>')<EOL><DEDENT>data_type += '<STR_LIT>'<EOL><DEDENT>if data_type in parameter_map:<EOL><INDENT>gp_param['<STR_LIT>'] = parameter_map[data_type].data_type<EOL><DEDENT>else:<EOL><INDENT>raise UnknownDataTypeError('<STR_LIT>' +<EOL>data_type +<EOL>'<STR_LIT>')<EOL><DEDENT>gp_param['<STR_LIT:name>'] = task_param['<STR_LIT:name>']<EOL>gp_param['<STR_LIT>'] = task_param['<STR_LIT>']<EOL>gp_param['<STR_LIT>'] = _DIRECTION_MAP[task_param['<STR_LIT>']]<EOL>gp_param['<STR_LIT>'] = '<STR_LIT>' if task_param['<STR_LIT>'] else '<STR_LIT>'<EOL>if gp_param['<STR_LIT>'] is '<STR_LIT>':<EOL><INDENT>gp_param['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>gp_param['<STR_LIT>'] = True if '<STR_LIT>' in task_param else False<EOL>gp_params.append(parameter_map[data_type].get_parameter(task_param).substitute(gp_param))<EOL>if '<STR_LIT>' in task_param:<EOL><INDENT>gp_param['<STR_LIT>'] = task_param['<STR_LIT>']<EOL>gp_params.append(parameter_map[data_type].default_value().substitute(gp_param))<EOL><DEDENT>if '<STR_LIT>' in task_param:<EOL><INDENT>gp_param['<STR_LIT>'] = task_param['<STR_LIT>']<EOL>gp_params.append(_CHOICELIST_TEMPLATE.substitute(gp_param))<EOL><DEDENT>for param_name in parameter_map[data_type].parameter_names(task_param):<EOL><INDENT>gp_param_list.append(param_name.substitute(gp_param))<EOL>gp_param_idx_list.append(_PARAM_INDEX_TEMPLATE.substitute(<EOL>{'<STR_LIT:name>': param_name.substitute(gp_param),<EOL>'<STR_LIT>': gp_param_idx}))<EOL>gp_param_idx += <NUM_LIT:1><EOL><DEDENT><DEDENT>gp_params.append(_PARAM_RETURN_TEMPLATE.substitute({'<STR_LIT>': convert_list(gp_param_list)}))<EOL>return '<STR_LIT>'.join(('<STR_LIT>'.join(gp_params), '<STR_LIT>'.join(gp_param_idx_list)))<EOL>
Builds the code block for the GPTool GetParameterInfo method based on the input task_params.

:param task_params: A list of task parameters to map to GPTool parameters.
:return: A string representing the code block to the GPTool GetParameterInfo method.