class_docstr: Credential for AWS S3 service
class_docstr_tok: ["Credential","for","AWS","S3","service"]
code: def is_expired(self):
      exp = self.get("expiration", None)
      if not exp:
          return False
      exp_epoch = iso8601_to_epoch(exp)
      # -2 to artificially shorten duration of the allotment to avoid
      # possible race conditions between us checking either it has
      # already expired before submitting a request.
      expire_in = (exp_epoch - time.time() - 2) / 3600.0
  
      lgr.debug(
          (
              "Credential %s has expired %.2fh ago"
              if expire_in <= 0
              else "Credential %s will expire in %.2fh"
          )
          % (self.name, expire_in)
      )
      return expire_in <= 0
  
imports: import time
  from ..support.exceptions import AccessDeniedError, CapturedException
  from ..support.keyring_ import keyring
  from ..ui import ui
  from ..utils import auto_repr
  from ..support.network import iso8601_to_epoch
  from datalad import cfg
  from datalad.config import anything2bool
  from datalad.distribution.dataset import Dataset
  from datalad.local.gitcredential import GitCredentialInterface
  from logging import getLogger
label_desc: Use image node_id 1 for calling the AWS_S3 obj's underlying member method code with example usage: obj.is_expired() and returns: unknown, False