code: def body_length(header, plaintext_length):
      
      body_length = 0
      if header.frame_length == 0:  # Non-framed
          body_length += _non_framed_body_length(header, plaintext_length)
      else:  # Framed
          frames, final_frame_bytes = divmod(plaintext_length, header.frame_length)
          body_length += frames * _standard_frame_length(header)
          body_length += _final_frame_length(header, final_frame_bytes)  # Final frame is always written
      return body_length
docs: Calculates the ciphertext message body length, given a complete header.
  
      :param header: Complete message header object
      :type header: aws_encryption_sdk.structures.MessageHeader
      :param int plaintext_length: Length of plaintext in bytes
      :rtype: int