code: def safe_split_text(text: str, length: int = MAX_MESSAGE_LENGTH) -> typing.List[str]:
      
      # TODO: More informative description
  
      temp_text = text
      parts = []
      while temp_text:
          if len(temp_text) > length:
              try:
                  split_pos = temp_text[:length].rindex(' ')
              except ValueError:
                  split_pos = length
              if split_pos < length // 4 * 3:
                  split_pos = length
              parts.append(temp_text[:split_pos])
              temp_text = temp_text[split_pos:].lstrip()
          else:
              parts.append(temp_text)
              break
      return parts
docs: Split long text
  
      :param text:
      :param length:
      :return: