import pytz


def IsValidTimezone(timezone):
    """
  Checks the validity of a timezone string value:
    - checks whether the timezone is in the pytz common_timezones list
    - assumes the timezone to be valid if the pytz module is not available
  """
    try:

        return timezone in pytz.common_timezones
    except ImportError:  # no pytz
        print("Timezone not checked " "(install pytz package for timezone validation)")
        return True