def METHOD_NAME(config):
    if config['relocatable']:
        config['basedir'] = '.'
    workerTAC = [workerTACTemplate[0]]
    if not config['no-logrotate']:
        workerTAC.append(workerTACTemplate[1])
    if not config['connection-string']:
        workerTAC.append(workerTACTemplate[2])
    else:
        workerTAC.append(workerTACTemplate[3])
    workerTAC.extend(workerTACTemplate[4:])
    return "".join(workerTAC) % config