class_docstr: LinkContentFetcher is a component for fetching and extracting content from URLs. It supports handling various
  content types, retries on failures, and automatic user-agent rotation for failed web requests.
class_docstr_tok: ["LinkContentFetcher","is","a","component","for","fetching","and","extracting","content","from","URLs",".","It","supports","handling","various","content","types",",","retries","on","failures",",","and","automatic","user-agent","rotation","for","failed","web","requests","."]
docstr: Switches the User-Agent for this LinkContentRetriever to the next one in the list of user agents.
  Used by tenacity to retry the requests with a different user agent.
  
  :param retry_state: The retry state (unused, required by tenacity).
docstr_tok: ["Switches","the","User-Agent","for","this","LinkContentRetriever","to","the","next","one","in","the","list","of","user","agents",".","Used","by","tenacity","to","retry","the","requests","with","a","different","user","agent",".",":","param","retry_state",":","The","retry","state","(","unused",",","required","by","tenacity",")","."]
code: def _switch_user_agent(self, retry_state: RetryCallState) -> None:
      """
      Switches the User-Agent for this LinkContentRetriever to the next one in the list of user agents.
      Used by tenacity to retry the requests with a different user agent.
  
      :param retry_state: The retry state (unused, required by tenacity).
      """
      self.current_user_agent_idx = (
          self.current_user_agent_idx + 1
      ) % len(self.user_agents)
      logger.debug(
          "Switched user agent to %s",
          self.user_agents[self.current_user_agent_idx],
      )
  
file_path: haystack/haystack/components/fetchers/link_content.py
imports: import logging
  from collections import defaultdict
  from concurrent.futures import ThreadPoolExecutor
  from typing import Callable, Dict, List, Optional, Tuple
  import requests
  from requests import Response
  from requests.exceptions import HTTPError
  from tenacity import RetryCallState, retry, retry_if_exception_type, stop_after_attempt, wait_exponential
  from haystack import component
  from haystack.dataclasses import ByteStream
  from haystack.version import __version__
label_desc: Use image node_id 6 for calling the LinkContentFetcher obj's underlying member method code with example usage: obj._switch_user_agent(retry_state) without return types