code: def load_certificates(ca_location, crl_location=None, invalidate_cache=False):
      
      if crl_location is None:
          crl_location = ''
  
      try:
          if invalidate_cache:
              del _cached_certificates[ca_location + crl_location]
          else:
              return _cached_certificates[ca_location + crl_location]
      except KeyError:
          pass
  
      ca, crl = None, None
      if ca_location:
          ca = _load_certificate(ca_location)
      if crl_location:
          crl = _load_certificate(crl_location)
  
      _cached_certificates[ca_location + crl_location] = ca, crl
      return ca, crl
docs: Load the CA certificate and CRL, caching it for future use.
  
      .. note::
          Providing the location of the CA and CRL as an HTTPS URL is deprecated
          and will be removed in a future release.
  
      Args:
          ca_location (str): The location of the Certificate Authority certificate. This should
              be the absolute path to a PEM-encoded file. It can also be an HTTPS url, but this
              is deprecated and will be removed in a future release.
          crl_location (str): The location of the Certificate Revocation List. This should
              be the absolute path to a PEM-encoded file. It can also be an HTTPS url, but
              this is deprecated and will be removed in a future release.
          invalidate_cache (bool): Whether or not to invalidate the certificate cache.
  
      Returns:
          tuple: A tuple of the (CA certificate, CRL) as unicode strings.
  
      Raises:
          requests.exception.RequestException: Any exception requests could raise.
          IOError: If the location provided could not be opened and read.