def localize_datetime(dt, tz_name='<STR_LIT>'):
tz_aware_dt = dt<EOL>if dt.tzinfo is None:<EOL><INDENT>utc = pytz.timezone('<STR_LIT>')<EOL>aware = utc.localize(dt)<EOL>timezone = pytz.timezone(tz_name)<EOL>tz_aware_dt = aware.astimezone(timezone)<EOL><DEDENT>else:<EOL><INDENT>logger.warn('<STR_LIT>')<EOL><DEDENT>return tz_aware_dt<EOL>
Provide a timzeone-aware object for a given datetime and timezone name