<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _config_stream(filename):
 """Given a configuration's filename, this returns a stream from which a configuration can be read. If `filename` is `None` or '-' then stream will be `sys.stdin`. Otherwise, it's the open file handle for the filename. """

    if filename is None or filename == '-':
        log.info('Reading config from stdin')
        yield sys.stdin
    else:
        with open(filename, mode='rt') as handle:
            log.info('Reading config from %r', filename)
            yield handle