input: Write a function to sort words in a given string by their length in descending alphabetical order. The function should take a single string argument and return a sorted string. Assume the input string contains only alphabetical characters and spaces. If the input string is empty, the function should return an empty string.
  
  assert sort_words_by_length("This is the string which is to be sorted")=="string sorted which be to is the This"
  assert sort_words_by_length("apple banana cherry date")=="banana cherry apple date"
  assert sort_words_by_length("quick brown fox jumps over the lazy dog")=="quick brown jumps lazy over fox the dog"
  assert sort_words_by_length("a an the and")=="an and the a"
  assert sort_words_by_length("")==""
output: def sort_words_by_length(s):
      words = s.split()
      sorted_words = sorted(words, key=lambda x: (-len(x), x))
      return ' '.join(sorted_words)