code: def _get_con_val(second_level_contrast, design_matrix):
      """Check the contrast and return con_val \
      when testing one contrast or more."""
      if second_level_contrast is None:
          if design_matrix.shape[1] == 1:
              second_level_contrast = np.ones([1])
          else:
              raise ValueError("No second-level contrast is specified.")
      if not isinstance(second_level_contrast, str):
          con_val = np.array(second_level_contrast)
          if np.all(con_val == 0) or len(con_val) == 0:
              raise ValueError(
                  "Contrast is null. Second_level_contrast must be a valid "
                  "contrast vector, a list/array of 0s and 1s, a string, or a "
                  "string expression."
              )
      else:
          design_columns = design_matrix.columns.tolist()
          con_val = expression_to_contrast_vector(
              second_level_contrast, design_columns
          )
      return con_val
  
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 15 for calling a global function with example usage: _get_con_val(second_level_contrast, design_matrix) and returns: con_val