def _buildStateTable(self):
        '''Return a dictionary of begin, do, end state function tuples'''
        # _buildStateTable leaves something to be desired but it does what it
        # does.. probably slowly, so I'm doing some evil caching so it doesn't
        # get called more than once per class.
        stateTable = getattr(self.__class__, '__stateTable', None)
        if stateTable is None:
            stateTable = self.__class__.__stateTable = zipfndict(
                *[prefixedMethodObjDict(self, prefix)
                  for prefix in ('begin_', 'do_', 'end_')])
        return stateTable
Return a dictionary of begin, do, end state function tuples
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/sux.py