human
Complete this python program:
def _setupSyslog(testCase):
assistant
#Here is the Python code you requested.

    """Make fake syslog, and return list to which prefix and then log
    messages will be appended if it is used.
    """
    logMessages = []
    class fakesyslogobserver(object, ):
        def __init__(self, prefix):
            logMessages.append(prefix)
        def emit(self, eventDict):
            logMessages.append(eventDict)
    testCase.patch(syslog, 'SyslogObserver', fakesyslogobserver)
    return logMessages