input: Write a python function to execute a shell command using a given password for sudo, and verify the installation of a package.
  assert execute_sudo_command('password', 'vim') == 0
  assert execute_sudo_command('wrongpassword', 'vim') != 0
output: def execute_sudo_command(password, package):
      import subprocess
      
      try:
          # Create the command to be executed
          command = f"echo {password} | sudo -S apt-get install -y {package}"
          
          # Execute the command
          result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
          
          return result.returncode
      except Exception as e:
          return -1