<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _store_header(self):
 """ Logic & state behind storing headers. This is a coroutine that should be sent header lines in the usual fashion. Sending it None will indicate there are no more lines, and the dictionary of headers will be returned. """

        key, value = None, None
        headers = []
        header_line = yield
        while header_line is not None:
            if not header_line.startswith((b' ', b'\t')):
                if key:
                    headers.append((key, value))
                key, value = self.split_header_key_value(header_line)
                key = key.upper()
            else:
                next_val = header_line.strip().decode()
                if isinstance(value, list):
                    value.append(next_val)
                else:
                    value = [value, next_val]
            header_line = yield

        if key is not None:
            headers.append((key, value))

        yield dict(headers)