def chrome_options(chrome_options, create_tmp_dir):
  """Set configuration to run Chrome with specific options."""
  prefs = {"download.default_directory": create_tmp_dir,
           "download.prompt_for_download": False}
  chrome_options.add_experimental_option("prefs", prefs)
  return chrome_options