input: Write a function to list the contents of a given directory. If the directory is invalid, return an empty list.
  import os
  
  def list_directory_contents(directory_path):
      if not os.path.isdir(directory_path):
          return []
      return os.listdir(directory_path)
  
  assert list_directory_contents('some_valid_directory') == ['file1.txt', 'file2.txt', 'folder1', 'folder2']
  assert list_directory_contents('invalid_directory') == []
  assert list_directory_contents('') == []
output: import os
  
  def list_directory_contents(directory_path):
      if not os.path.isdir(directory_path):
          return []
      return os.listdir(directory_path)