def __getitem__(self, key):
        """
        Look up an item in the submapping for this L{CallMapping}, calling it
        if C{key} ends with C{"()"}.
        """
        callit = key.endswith(u"()")
        realKey = key[:-2] if callit else key
        value = self._submapping[realKey]
        if callit:
            value = value()
        return value

        Look up an item in the submapping for this L{CallMapping}, calling it
        if C{key} ends with C{"()"}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/_format.py