human
I wrote the below code

    @util.decorator
    def decorated(fn, self, connection):
        connection = connection.connect()
        try:
            return connection.info[key]
        except KeyError:
            connection.info[key] = val = fn(self, connection)
            return val
    return decorated

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def connection_memoize(key):