def _sge_filename_mapping(jobname, jobid, file_name):
    """
    Map STDOUT/STDERR filenames (as recorded in `Application.outputs`)
    to SGE/OGS default STDOUT/STDERR file names (e.g.,
    ``<jobname>.o<jobid>``).
    """
    try:
        return {('%s.out' % jobname): '%s.o%s' % (jobname, jobid), (
            '%s.err' % jobname): '%s.e%s' % (jobname, jobid), ('%s.cosmo' %
            jobname): '%s.o%s.cosmo' % (jobname, jobid), ('%s.dat' %
            jobname): '%s.o%s.dat' % (jobname, jobid), ('%s.inp' % jobname):
            '%s.o%s.inp' % (jobname, jobid), ('%s.irc' % jobname): 
            '%s.o%s.irc' % (jobname, jobid)}[file_name]
    except KeyError:
        return file_name
