code: def fill_in_missing_output_path(output, output_name, tool_inputs):
      """
      Creates a path template for outputs that are missing one
      This is needed for the descriptor to be valid (path template is required)
      """
      # Look for an input with the same name as the output and use its value key
      found = False
      for input in tool_inputs:
          if input["name"] == output_name:
              output["path-template"] = input["value-key"]
              found = True
              break
      # If no input with the same name was found, use the output ID
      if not found:
          output["path-template"] = output["id"]
      return output
  
file_path: nipype/nipype/utils/nipype2boutiques.py
imports: import os
  import sys
  import simplejson
  from ..scripts.instance import import_module
label_desc: Use image node_id 7 for calling a global function with example usage: fill_in_missing_output_path(output, output_name, tool_inputs) and returns: output