code: def check_freq_unit_at_most_day(freq, name):
      """Checks if the ``freq`` parameter passed to a function has unit at most "D"
  
      Parameters
      ----------
      freq : `DateOffset`, `Timedelta` or `str`
          The parameter passed as ``freq``.
      name : `str`
          The name of the parameter ``freq``.
  
      Returns
      -------
      None
  
      Raises
      ------
      ValueError
          Because the input frequency has unit greater than "D".
      """
      if isinstance(freq, str) and any(
          char in freq for char in ["W", "M", "Y"]
      ):
          raise ValueError(
              f"In {name}, the maximal unit is 'D', "
              "i.e., you may use units no more than 'D' such as"
              "'10D', '5H', '100T', '200S'. The reason is that 'W', 'M' "
              "or higher has either cycles or indefinite number of days, "
              "thus is not parsable by pandas as timedelta."
          )
  
imports: import warnings
  from datetime import timedelta
  import numpy
  import pandas
  import plotly.graph_objects
  from pandas.plotting import register_matplotlib_converters
  from pandas.tseries.frequencies import to_offset
  from sklearn.linear_model import Lasso
  from sklearn.linear_model import LassoCV
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import RidgeCV
  from greykite.common.constants import CHANGEPOINT_COL_PREFIX
  from greykite.common.constants import TimeFeaturesEnum
  from greykite.common.features.timeseries_features import add_time_features_df
  from greykite.common.features.timeseries_features import build_time_features_df
  from greykite.common.features.timeseries_features import fourier_series_multi_fcn
  from greykite.common.features.timeseries_features import get_changepoint_dates_from_changepoints_dict
  from greykite.common.features.timeseries_features import get_changepoint_features
  from greykite.common.features.timeseries_features import get_changepoint_features_and_values_from_config
  from greykite.common.features.timeseries_features import get_default_origin_for_time_vars
  from greykite.common.python_utils import get_pattern_cols
  from greykite.common.python_utils import unique_elements_in_list
label_desc: Use image node_id 1 for calling a global function with example usage: check_freq_unit_at_most_day(freq, name) without return types