<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mlength(message, N=1, word_spaced=True):
 """ Returns Morse length 50 250 """

    message = _repeat_word(message, N)
    if word_spaced:
        message = message + " E"
    lst_bin = _encode_binary(message)
    N = len(lst_bin)
    if word_spaced:
        N -= 1  # E is one "dit" so we remove it
    return N