code: def get_expiration_seconds_v2(expiration):
      
      # If it's a timedelta, add it to `now` in UTC.
      if isinstance(expiration, datetime.timedelta):
          now = NOW().replace(tzinfo=_helpers.UTC)
          expiration = now + expiration
  
      # If it's a datetime, convert to a timestamp.
      if isinstance(expiration, datetime.datetime):
          micros = _helpers._microseconds_from_datetime(expiration)
          expiration = micros // 10 ** 6
  
      if not isinstance(expiration, six.integer_types):
          raise TypeError(
              "Expected an integer timestamp, datetime, or "
              "timedelta. Got %s" % type(expiration)
          )
      return expiration
docs: Convert 'expiration' to a number of seconds in the future.
  
      :type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
      :param expiration: Point in time when the signed URL should expire.
  
      :raises: :exc:`TypeError` when expiration is not a valid type.
  
      :rtype: int
      :returns: a timestamp as an absolute number of seconds since epoch.