def _gen_filename(self, name):
    if (name == 'output_file'):
        output_file = self.inputs.output_file
        if isdefined(output_file):
            return os.path.abspath(output_file)
        else:
            return (aggregate_filename(self.inputs.input_files, 'xfmavg_output') + '.xfm')
    else:
        raise NotImplemented
def _gen_filename(self, name):
    if (name == 'output_file'):
        output_file = self.inputs.output_file
        if isdefined(output_file):
            return os.path.abspath(output_file)
        else:
            return (aggregate_filename(self.inputs.input_files, 'xfmavg_output') + '.xfm')
    else:
        raise NotImplemented