input: Write a function to list the contents of a directory in Python. If the directory is empty, return an empty list. If the directory does not exist, raise an exception.
  assert list_directory_contents("sample_directory")==["file1.txt", "file2.txt", "folder1"]
  assert list_directory_contents("empty_directory")==[]
  try:
      list_directory_contents("non_existent_directory")
  except Exception as e:
      assert str(e) == "No such directory"
output: import os
  
  def list_directory_contents(directory):
      if not os.path.exists(directory):
          raise Exception("No such directory")
      return os.listdir(directory)