#NEWLINE# def _expires_in_seconds( input_ ) : #NEWLINE# #INDENT# if isinstance ( input_ , date ) : #NEWLINE# #INDENT# if ( not isinstance ( input_ , datetime ) ) : #NEWLINE# #INDENT# input_ = datetime . combine ( input_ , datetime . min . time ( ) ) #NEWLINE# #UNINDENT# now = datetime . utcnow ( ) #NEWLINE# input_ = ( input_ - now ) #NEWLINE# #UNINDENT# if isinstance ( input_ , timedelta ) : #NEWLINE# #INDENT# return int ( input_ . total_seconds ( ) ) #NEWLINE# #UNINDENT# return input_