input: Write a function to list the contents of a given directory. The function should take the directory path as input and return the list of items (files and directories) in that directory. If the given directory path is invalid, return an empty list.
  assert list_directory_contents('/home/user/documents')==['file1.txt', 'file2.txt', 'directory1']
  assert list_directory_contents('/invalid/path')==[]
  assert list_directory_contents('/home/user/empty_directory')==[]
output: def list_directory_contents(directory_path):
      import os
      if not os.path.isdir(directory_path):
          return []
      return os.listdir(directory_path)