code: def _check_is_multivariate(Z, var_name="input"):
      """Check if series is multivariate."""
      if isinstance(Z, pd.Series):
          raise ValueError(
              f"{var_name} must have 2 or more variables, but found 1."
          )
      if isinstance(Z, pd.DataFrame):
          nvars = Z.shape[1]
          if nvars < 2:
              raise ValueError(
                  f"{var_name} must have 2 or more variables, but found {nvars}."
              )
      if isinstance(Z, np.ndarray):
          if Z.ndim == 1 or (Z.ndim == 2 and Z.shape[1] == 1):
              raise ValueError(
                  f"{var_name} must have 2 or more variables, but found 1."
              )
  
file_path: sktime/sktime/utils/validation/series.py
imports: from typing import Union
  import numpy
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: _check_is_multivariate(Z, var_name) without return types