code: def _convert(value, tzto, defaulttz):
      
      if not isinstance(value, datetime):
          raise ValueError('value must be a datetime.datetime object')
  
      if value.tzinfo is None:
          value = value.replace(tzinfo=defaulttz)
  
      return value.astimezone(tzto)
docs: Convert datetime.datetime object between timezones