input: Write a function to list the contents of a directory. The function should take a directory path as input and return a list of all items (files and subdirectories) in that directory. If the directory path is not provided, the function should list the contents of the current working directory. If the path is invalid or the directory is empty, the function should return an empty list.
  
  def list_directory_contents(directory_path=None):
      import os
      if not directory_path:
          directory_path = os.getcwd()
      if os.path.isdir(directory_path):
          return os.listdir(directory_path)
      return []
  
  assert list_directory_contents('/path/to/directory')==['file1.txt', 'file2.txt', 'subdir']
  assert list_directory_contents()==['current_dir_item1', 'current_dir_item2']
  assert list_directory_contents('/invalid/path')==[]
  assert list_directory_contents('/empty/directory')==[]
output: def list_directory_contents(directory_path=None):
      import os
      if not directory_path:
          directory_path = os.getcwd()
      if os.path.isdir(directory_path):
          return os.listdir(directory_path)
      return []