code: def encode(message, encoding_type='default', letter_sep=' ' * 3, strip=True):
      
      if strip:
          message = message.strip()  # No trailing or leading spaces
  
      encoding_type = encoding_type.lower()
      allowed_encoding_type = ['default', 'binary']
  
      if encoding_type == 'default':
          return _encode_to_morse_string(message, letter_sep)
      elif encoding_type == 'binary':
          return _encode_to_binary_string(message, on='1', off='0')
      else:
          raise NotImplementedError("encoding_type must be in %s" % allowed_encoding_type)
docs: Converts a string of message into morse
  
      Two types of marks are there. One is short mark, dot(.) or "dit" and
      other is long mark, dash(-) or "dah". After every dit or dah, there is
      a one dot duration or one unit log gap.
  
      Between every letter, there is a short gap (three units long).
      Between every word, there is a medium gap (seven units long).
  
      When encoding is changed to binary, the short mark(dot) is denoted by 1
      and the long mark(dash) is denoted by 111. The intra character gap between
      letters is represented by 0.
  
      The short gap is represented by 000 and the medium gap by 0000000.
  
      >>> message = "SOS"
      >>> encode(message)
      '...   ---   ...'
  
      >>> message = " SOS"
      >>> encode(message, strip=False)
      '     ...   ---   ...'
  
      Parameters
      ----------
      message : String
  
      encoding : Type of encoding
          Supported types are default(morse) and binary.
  
      Returns
      -------
      encoded_message : String