<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(stream, container=dict):
 """ Load and parse a file or file-like object 'stream' provides simple shell variables' definitions. :param stream: A file or file like object :param container: Factory function to create a dict-like object to store properties :return: Dict-like object holding shell variables' definitions {} {} {'aaa': ''} {'aaa': 'bbb'} {'aaa': 'bbb'} """

    ret = container()

    for line in stream.readlines():
        line = line.rstrip()
        if line is None or not line:
            continue

        (key, val) = _parseline(line)
        if key is None:
            LOGGER.warning("Empty val in the line: %s", line)
            continue

        ret[key] = val

    return ret