input: 
  def sort_words_by_length(my_string: str) -> str:
      """
      Sorts the words in a given string by their length in decreasing order and 
      in alphabetical order for words of the same length.
      >>> sort_words_by_length("This is the string which is to be sorted")
      'string sorted This the to which is be is'
      """
      words = my_string.split(' ')
      words_with_length = [(len(word), word) for word in words]
      words_with_length.sort(reverse=True, key=lambda x: (x[0], x[1]))
      sorted_string = " ".join([i[1] for i in words_with_length])
      return sorted_string
  
output:     words = my_string.split(' ')
      words_with_length = [(len(word), word) for word in words]
      words_with_length.sort(reverse=True, key=lambda x: (x[0], x[1]))
      sorted_string = " ".join([i[1] for i in words_with_length])
      return sorted_string