code: def rolling_mean(vector: np.ndarray, window: int) -> np.ndarray:
      if window >= len(vector):
          return np.sum(vector) * np.ones((len(vector),))  # type: ignore
      if window <= 1:
          return vector
      cumsum: np.ndarray = np.cumsum(np.concatenate(([0], vector, vector[: window - 1])))  # type: ignore
      return cumsum[window:] - cumsum[:-window]
  
imports: import typing
  import numpy
  from .None import core
  from .None import transforms
  from .data import Data, Scalar
  from .choice import Choice
  from .None import _layering
label_desc: Use image node_id 2 for calling a global function with example usage: rolling_mean(vector, window) and returns: unknown, unknown, vector