def METHOD_NAME(self, length):
    """
    Confirm that the frame is an appropriate length.
    """
    if length > self.max_frame_size:
        raise FrameTooLargeError(
            "Received overlong frame: length %d, max %d" %
            (length, self.max_frame_size)
        )