input: from typing import List
  
  def sort_words_by_length_and_alphabet(sentence: str) -> str:
      """ 
      Sort words in a given string by their length in decreasing order and, in case of ties, by alphabetical order.
      >>> sort_words_by_length_and_alphabet("This is the string which is to be sorted")
      'sorted string the which This is to be'
      >>> sort_words_by_length_and_alphabet("apple banana cherry date")
      'banana cherry date apple'
      """
      words = sentence.split(' ')
      words_with_length = [(len(word), word) for word in words]
      words_with_length.sort(key=lambda x: (-x[0], x[1]), reverse=False)
      return " ".join([i[1] for i in words_with_length])
output:     words = sentence.split(' ')
      words_with_length = [(len(word), word) for word in words]
      words_with_length.sort(key=lambda x: (-x[0], x[1]), reverse=False)
      return " ".join([i[1] for i in words_with_length])