input: from typing import List
  
  def sort_words_by_length_and_alpha(my_string: str) -> str:
      """
      Sorts words in a given string by their length in decreasing order and alphabetically in case of a tie.
      
      >>> sort_words_by_length_and_alpha("This is the string which is to be sorted")
      'which sorted string This to the is be'
      >>> sort_words_by_length_and_alpha("apple banana cherry date")
      'banana cherry apple date'
      """
      
      words = my_string.split(' ')  # split string into list of words
      
      # create a list of tuples where the first element is the length of the word and the second element is the word itself
      words_with_length = [(len(word), word) for word in words]
      
      # sort list of tuples according to 1st element of tuple i.e. length of word and alphabetically in case of a tie
      words_with_length.sort(key=lambda x: (-x[0], x[1]))
      
      # wl contains list words in decreasing order of their length and alphabetically in case of a tie
      # now use join() to join all words with " "
      sorted_string = " ".join([i[1] for i in words_with_length])
      
      return sorted_string
output:     words = my_string.split(' ')  # split string into list of words
      
      # create a list of tuples where the first element is the length of the word and the second element is the word itself
      words_with_length = [(len(word), word) for word in words]
      
      # sort list of tuples according to 1st element of tuple i.e. length of word and alphabetically in case of a tie
      words_with_length.sort(key=lambda x: (-x[0], x[1]))
      
      # wl contains list words in decreasing order of their length and alphabetically in case of a tie
      # now use join() to join all words with " "
      sorted_string = " ".join([i[1] for i in words_with_length])
      
      return sorted_string