<s> """<STR_LIT>""" <EOL> import datetime <EOL> import re <EOL> import pytz <EOL> from lxml import etree <EOL> UTC_TIMEZONE = pytz . utc <EOL> def parse_iso_8601_time_str ( time_str ) : <EOL> """<STR_LIT>""" <EOL> if re . search ( '<STR_LIT>' , time_str ) : <EOL> submitted_at = datetime . datetime . strptime ( time_str , '<STR_LIT>' ) <EOL> else : <EOL> submitted_at = datetime . datetime . strptime ( time_str , '<STR_LIT>' ) <EOL> return submitted_at . replace ( tzinfo = UTC_TIMEZONE ) <EOL> def prettyprint_xml ( element ) : <EOL> """<STR_LIT>""" <EOL> return etree . tostring ( element , pretty_print = True ) . decode ( '<STR_LIT:utf-8>' ) </s>
