code: def _parse_expires(expires):
      
      # none is used to signify positive infinity
      if expires is None or expires in ('never', 'infinity'):
          return 'infinity'
  
      try:
          return dateutil.parser.parse(unicode(expires))
      except ValueError as exc:
          pass
  
      try:
          # use parsedatetime for "human readable" time specs
          exp = pdt.parse(expires)[0]
          # and convert to datetime
          return datetime.datetime.fromtimestamp(time.mktime(exp))
      except ValueError as exc:
          pass
  
      raise NipapValueError("Invalid date specification for expires")
docs: Parse the 'expires' attribute, guessing what format it is in and
          returning a datetime