input: Write a function to list the contents of a specified directory. If the directory is not specified, it should list the contents of the current directory. The function should return a list of all contents in the directory.
  
  
  import os
  def list_directory_contents(directory=None):
      if directory is None:
          directory_contents = os.listdir()
      else:
          directory_contents = os.listdir(directory)
      return directory_contents
  
  assert list_directory_contents() == ['file1.txt', 'file2.txt', 'folder']
  assert list_directory_contents('/path/to/directory') == ['file3.txt', 'file4.txt', 'folder2']
  assert list_directory_contents('') == ['file1.txt', 'file2.txt', 'folder']
  assert list_directory_contents('/non/existent/path') == []
  
output: import os
  def list_directory_contents(directory=None):
      if directory is None:
          directory_contents = os.listdir()
      else:
          directory_contents = os.listdir(directory)
      return directory_contents