def _gen_filename(self, name):
    if (name == 'output_xfm'):
        output_xfm = self.inputs.output_xfm
        if isdefined(output_xfm):
            return os.path.abspath(output_xfm)
        else:
            return (aggregate_filename([self.inputs.source, self.inputs.target], 'nlpfit_xfm_output') + '.xfm')
    else:
        raise NotImplemented
def _gen_filename(self, name):
    if (name == 'output_xfm'):
        output_xfm = self.inputs.output_xfm
        if isdefined(output_xfm):
            return os.path.abspath(output_xfm)
        else:
            return (aggregate_filename([self.inputs.source, self.inputs.target], 'nlpfit_xfm_output') + '.xfm')
    else:
        raise NotImplemented