def METHOD_NAME(self, basename, out_dir=None, suffix=None, ext=None):
    if basename == "":
        msg = "Unable to generate filename for command %s. " % self.cmd
        msg += "basename is not set!"
        raise ValueError(msg)
    _, final_bn, final_ext = split_filename(basename)
    if out_dir is None:
        out_dir = os.getcwd()
    if ext is not None:
        final_ext = ext
    if suffix is not None:
        final_bn = "".join((final_bn, suffix))
    return os.path.abspath(os.path.join(out_dir, final_bn + final_ext))