code: def gen_filename_from_param(param, base):
      fileExtensions = param.getAttribute("fileExtensions")
      if fileExtensions:
          # It is possible that multiple file extensions can be specified in a
          # comma separated list,  This will extract just the first extension
          firstFileExtension = fileExtensions.split(",")[0]
          ext = firstFileExtension
      else:
          ext = {
              "image": ".nii",
              "transform": ".mat",
              "file": "",
              "directory": "",
              "geometry": ".vtk",
          }[param.nodeName]
      return base + ext
  
file_path: nipype/nipype/interfaces/slicer/generate_classes.py
imports: import xml.dom.minidom
  import subprocess
  import os
  from shutil import rmtree
  import keyword
label_desc: Use image node_id 9 for calling a global function with example usage: gen_filename_from_param(param, base) and returns: unknown