input: Write a python function to check the validity of a package and simulate the validation process.
  assert validate_package(["package1", "package2", "package3"]) == ["package1", "package2", "package3"]
  assert validate_package(["package1", "package2", "invalid_package"]) == ["package1", "package2"]
  assert validate_package(["invalid_package"]) == []
output: def validate_package(packages):
      valid_packages = {"package1", "package2", "package3"}  # Example set of valid packages
      return [pkg for pkg in packages if pkg in valid_packages]