<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def body_length(header, plaintext_length):
 """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 """

    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