class_docstr: Have one place to retrieve data from Yahoo API in order to ease caching and speed up operations.
  Singleton means one session one cookie shared by all threads.
class_docstr_tok: ["Have","one","place","to","retrieve","data","from","Yahoo","API","in","order","to","ease","caching","and","speed","up","operations",".","Singleton","means","one","session","one","cookie","shared","by","all","threads","."]
code: def _get_cookie_basic(self, proxy=None, timeout=30):
      if self._cookie is not None:
          utils.get_yf_logger().debug("reusing cookie")
          return self._cookie
  
      self._cookie = self._load_cookie_basic()
      if self._cookie is not None:
          return self._cookie
  
      # To avoid infinite recursion, do NOT use self.get()
      # - 'allow_redirects' copied from @psychoz971 solution - does it help USA?
      response = self._session.get(
          url="https://fc.yahoo.com",
          headers=self.user_agent_headers,
          proxies=proxy,
          timeout=timeout,
          allow_redirects=True,
      )
  
      if not response.cookies:
          utils.get_yf_logger().debug("response.cookies = None")
          return None
      self._cookie = list(response.cookies)[0]
      if self._cookie == "":
          utils.get_yf_logger().debug("list(response.cookies)[0] = ''")
          return None
      self._save_cookie_basic(self._cookie)
      utils.get_yf_logger().debug(
          f"fetched basic cookie = {self._cookie}"
      )
      return self._cookie
  
imports: import functools
  from functools import lru_cache
  import requests
  from bs4 import BeautifulSoup
  import datetime
  from frozendict import frozendict
  from .None import utils, cache
  import threading
label_desc: Use image node_id 8 for calling the YfData obj's underlying member method code with example usage: obj._get_cookie_basic(proxy, timeout) and returns: self, self, self, None, None