code: def test_get_seasonality_order_from_dataframe():
      """Tests get_seasonality_order_from_dataframe"""
      silverkite = SimpleSilverkiteForecast()
      fs = silverkite._SimpleSilverkiteForecast__get_silverkite_seasonality(
          simple_freq=SimpleTimeFrequencyEnum.DAY.name,
          num_days=SilverkiteSeasonalityEnum.YEARLY_SEASONALITY.value.default_min_days,
      )
  
      # properly fetches seasonality order
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.WEEKLY_SEASONALITY.value,
              fs=fs,
          )
          == SilverkiteSeasonalityEnum.WEEKLY_SEASONALITY.value.order
      )
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.QUARTERLY_SEASONALITY.value,
              fs=fs,
          )
          == SilverkiteSeasonalityEnum.QUARTERLY_SEASONALITY.value.order
      )
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.YEARLY_SEASONALITY.value,
              fs=fs,
          )
          == SilverkiteSeasonalityEnum.YEARLY_SEASONALITY.value.order
      )
      # max_order
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.WEEKLY_SEASONALITY.value,
              fs=fs,
              max_order=1,
          )
          == 1
      )
  
      # returns 0 if seasonality is not found in the dataframe
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.DAILY_SEASONALITY.value,
              fs=fs,
          )
          == 0
      )
  
      seas = SilverkiteSeasonality(
          name="ct1",
          period=1.0,
          order=2,
          seas_names="another_one",
          default_min_days=10,
      )
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=seas, fs=fs
          )
          == 0
      )
  
      # returns 0 if there is no dataframe
      assert (
          silverkite._SimpleSilverkiteForecast__get_seasonality_order_from_dataframe(
              seasonality=SilverkiteSeasonalityEnum.WEEKLY_SEASONALITY.value,
              fs=None,
          )
          == 0
      )
  
imports: import datetime
  import math
  import sys
  import warnings
  from datetime import timedelta
  import pandas
  import pytest
  from testfixtures import LogCapture
  import greykite.common.constants
  from greykite.algo.changepoint.adalasso.changepoint_detector import ChangepointDetector
  from greykite.algo.forecast.silverkite.constants.silverkite_column import SilverkiteColumn
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonality
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonalityEnum
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite import SimpleSilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.common.constants import CHANGEPOINT_COL_PREFIX
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.enums import SimpleTimeFrequencyEnum
  from greykite.common.enums import TimeEnum
  from greykite.common.features.timeseries_features import get_available_holidays_across_countries
  from greykite.common.features.timeseries_features import get_holidays
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import update_dictionary
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
label_desc: Use image node_id 15 for calling a global function with example usage: test_get_seasonality_order_from_dataframe() without return types