def _GetTimezone(timezone_string):
 if (pytz is None):
  if timezone_string:
   raise ValueError('need pytz in order to specify a timezone')
  return None
 if timezone_string:
  return pytz.timezone(timezone_string)
 else:
  return pytz.utc

def _GetTimezone ( timezone_string ) : if ( pytz is None ) : if timezone_string : raise ValueError ( 'need pytz in order to specify a timezone' ) return None if timezone_string : return pytz . timezone ( timezone_string ) else : return pytz . utc
converts a timezone string to a pytz timezone object .