code: def retry(self, retries=3, backoff_factor=0.3, status_forcelist=(500, 502, 504)):
          
          retries = Retry(
              total=retries,
              read=retries,
              connect=retries,
              backoff_factor=backoff_factor,
              status_forcelist=status_forcelist,
          )
          # mount all https requests
          self.mount('https://', adapters.HTTPAdapter(max_retries=retries))
docs: Add retry to Requests Session
  
          https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.retry.Retry