def METHOD_NAME(self, name, ext=None):
    fname, fext = op.splitext(op.basename(self.inputs.in_file))
    if fext == ".gz":
        fname, fext2 = op.splitext(fname)
        fext = fext2 + fext
    if not isdefined(self.inputs.out_prefix):
        out_prefix = op.abspath(fname)
    else:
        out_prefix = self.inputs.out_prefix
    if ext is None:
        ext = fext
    return out_prefix + "_" + name + ext