docs: def create_param_info(task_params, parameter_map):
      """
      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.
      """
      gp_params = []
      gp_param_list = []
      gp_param_idx_list = []
      gp_param_idx = 0
      for task_param in task_params:
          # Setup to gp_param dictionary used to substitute against the parameter info template.
          gp_param = {}
  
          # Convert DataType
          data_type = task_param['type'].upper()
          if 'dimensions' in task_param:
              if len(task_param['dimensions'].split(',')) > 1:
                  raise UnknownDataTypeError('Only one-dimensional arrays are supported.')
              data_type += 'ARRAY'
  
          if data_type in parameter_map:
              gp_param['dataType'] = parameter_map[data_type].data_type
          else:
              # No Mapping exists for this data type!
              raise UnknownDataTypeError('Unable to map task datatype: ' +
                                         data_type +
                                         '.  A template must be created.')
  
          gp_param['name'] = task_param['name']
          gp_param['displayName'] = task_param['display_name']
          gp_param['direction'] = _DIRECTION_MAP[task_param['direction']]
          gp_param['paramType'] = 'Required' if task_param['required'] else 'Optional'
          # ENVI/IDL output type translates to a derived output type in Arc
          if gp_param['direction'] is 'Output':
              gp_param['paramType'] = 'Derived'
  
          gp_param['multiValue'] = True if 'dimensions' in task_param else False
  
          # Substitute values into the template
          gp_params.append(parameter_map[data_type].get_parameter(task_param).substitute(gp_param))
  
          # Convert the default value
          if 'default_value' in task_param:
              gp_param['defaultValue'] = task_param['default_value']
              gp_params.append(parameter_map[data_type].default_value().substitute(gp_param))
  
          # Convert any choicelist
          if 'choice_list' in task_param:
              gp_param['choiceList'] = task_param['choice_list']
              gp_params.append(_CHOICELIST_TEMPLATE.substitute(gp_param))
  
          # Construct the parameter list and indicies for future reference
          for param_name in parameter_map[data_type].parameter_names(task_param):
              gp_param_list.append(param_name.substitute(gp_param))
              gp_param_idx_list.append(_PARAM_INDEX_TEMPLATE.substitute(
                  {'name': param_name.substitute(gp_param),
                   'idx': gp_param_idx}))
              gp_param_idx += 1
  
      # Construct the final parameter string
      gp_params.append(_PARAM_RETURN_TEMPLATE.substitute({'paramList': convert_list(gp_param_list)}))
      return ''.join((''.join(gp_params), ''.join(gp_param_idx_list)))