code: def localize(dt, tz):
      
      if not isinstance(tz, tzinfo):
          tz = pytz.timezone(tz)
  
      return tz.localize(dt)
docs: Given a naive datetime object this method will return a localized
      datetime object