'Convenience function to create a stagein/stageout list'

def get_stage_in_out(self, fnames, symlink=False):

    stage = ''
    for fname in fnames:
        if os.access(fname, os.R_OK):
            if stage:
                stage += ','
            if (symlink and self.app.config.pbs_stage_path):
                stage_name = os.path.join(self.app.config.pbs_stage_path, os.path.split(fname)[1])
            else:
                stage_name = fname
            stage += ('%s@%s:%s' % (stage_name, self.app.config.pbs_dataset_server, fname))
    return stage
