code: def _check_input_as_type(
      second_level_input, input_type, none_confounds, none_design_matrix
  ):
      if input_type == "flm_object":
          _check_input_as_first_level_model(
              second_level_input, none_confounds
          )
      elif input_type == "pd_series":
          second_level_input = second_level_input.to_list()
          _check_input_as_nifti_images(
              second_level_input, none_design_matrix
          )
      elif input_type == "nii_object":
          _check_input_as_nifti_images(
              second_level_input, none_design_matrix
          )
      else:
          _check_input_as_dataframe(second_level_input)
  
imports: import sys
  import time
  from warnings import warn
  import numpy
  import pandas
  from joblib import Memory
  from nibabel import Nifti1Image
  from sklearn.base import clone
  from nilearn._utils import fill_doc, stringify_path
  from nilearn._utils.niimg_conversions import check_niimg
  from nilearn.glm._base import BaseGLM
  from nilearn.glm.contrasts import compute_contrast, expression_to_contrast_vector
  from nilearn.glm.first_level import FirstLevelModel, run_glm
  from nilearn.glm.first_level.design_matrix import make_second_level_design_matrix
  from nilearn.glm.regression import RegressionResults, SimpleRegressionResults
  from nilearn.image import mean_img
  from nilearn.maskers import NiftiMasker
  from nilearn.mass_univariate import permuted_ols
label_desc: Use image node_id 6 for calling a global function with example usage: _check_input_as_type(second_level_input, input_type, none_confounds, none_design_matrix) without return types