code: def _check_window_length(window_length: Union[int, str]) -> None:
      # Window length must either be a valid offset alias
      if isinstance(window_length, str):
          try:
              to_offset(window_length)
          except ValueError:
              raise ValueError(
                  f"Cannot roll series. The specified window length, {window_length}, is not a valid offset alias.",
              )
      # Or an integer greater than zero
      elif isinstance(window_length, int):
          if window_length <= 0:
              raise ValueError(
                  "Window length must be greater than zero."
              )
      else:
          raise TypeError(
              "Window length must be either an offset string or an integer."
          )
  
file_path: featuretools/featuretools/primitives/standard/transform/time_series/utils.py
imports: from typing import Callable, Optional, Union
  import numpy
  import pandas
  from pandas import Series
  from pandas.core.window.rolling import Rolling
  from pandas.tseries.frequencies import to_offset
label_desc: Use image node_id 4 for calling a global function with example usage: _check_window_length(window_length) without return types