code: def _find_protocol_error(tb, proto_name):
      
      tb_info = traceback.extract_tb(tb)
      for frame in reversed(tb_info):
          if frame.filename == proto_name:
              return frame
      else:
          raise KeyError
docs: Return the FrameInfo for the lowest frame in the traceback from the
      protocol.