input: Write a function that takes a string as input and generates a list of all its substrings ordered from longest to shortest in length. Implement the function in Python and test it with the provided examples.
  
  def get_substrings(string):
      substrings = []
      n = len(string)
      for length in range(n, 0, -1):
          for start in range(n - length + 1):
              substrings.append(string[start:start + length])
      return substrings
  
  assert get_substrings("abc") == ["abc", "ab", "bc", "a", "b", "c"]
  assert get_substrings("hello") == ["hello", "hell", "ello", "hel", "ell", "llo", "he", "el", "ll", "lo", "h", "e", "l", "l", "o"]
  assert get_substrings("12345") == ["12345", "1234", "2345", "123", "234", "345", "12", "23", "34", "45", "1", "2", "3", "4", "5"]
  assert get_substrings("") == []
  assert get_substrings("x") == ["x"]
output: def get_substrings(string):
      substrings = []
      n = len(string)
      for length in range(n, 0, -1):
          for start in range(n - length + 1):
              substrings.append(string[start:start + length])
      return substrings