code: def _window_getter(
      window_name,
      window_depth=None,
      window_length=None,
      window_step=None,
  ):
      """Get window method correspondent to given string and initialises with parameters.
  
      Parameters
      ----------
      window_name: str, String from ['global', 'sliding', 'expanding', 'dyadic']
          used to access the window method.
      window_depth: int, The depth of the dyadic window. (Active only if
          `window_name == 'dyadic']`.
      window_length: int, The length of the sliding/expanding window. (Active
          only if `window_name in ['sliding, 'expanding'].
      window_step: int, The step of the sliding/expanding window. (Active
          only if `window_name in ['sliding, 'expanding'].
  
      Returns
      -------
      list:
          A list of lists where the inner lists are lists of tuples that
          denote the start and end indexes of each window.
      """  # noqa: E501
      # Setup all available windows here
      length_step = {"length": window_length, "step": window_step}
      window_dict = {
          "global": (_Global, {}),
          "sliding": (_Sliding, length_step),
          "expanding": (_Expanding, length_step),
          "dyadic": (_Dyadic, {"depth": window_depth}),
      }
  
      if window_name not in window_dict.keys():
          raise ValueError(
              "Window name must be one of: {}. Got: {}.".format(
                  window_dict.keys(), window_name
              )
          )
  
      window_cls, window_kwargs = window_dict[window_name]
      return window_cls(**window_kwargs)
  
imports: import collections
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _window_getter(window_name, window_depth, window_length, window_step) and returns: window_cls