code: def _check_repetition_time(t_r):
      """Check that the repetition time is a positive number."""
      if not isinstance(t_r, (float, int)):
          raise TypeError(
              f"'t_r' must be a float or an integer. Got {type(t_r)} instead."
          )
      if t_r <= 0:
          raise ValueError(
              f"'t_r' must be positive. Got {t_r} instead."
          )
  
imports: from __future__ import annotations
  import csv
  import glob
  import os
  import sys
  import time
  from pathlib import Path
  from warnings import warn
  import numpy
  import pandas
  from joblib import Memory, Parallel, delayed
  from nibabel import Nifti1Image
  from sklearn.base import clone
  from sklearn.cluster import KMeans
  from nilearn._utils import fill_doc, stringify_path
  from nilearn._utils.niimg_conversions import check_niimg
  from nilearn._utils.param_validation import check_run_sample_masks
  from nilearn.glm._base import BaseGLM
  from nilearn.glm.contrasts import compute_fixed_effect_contrast, expression_to_contrast_vector
  from nilearn.glm.first_level.design_matrix import make_first_level_design_matrix
  from nilearn.glm.regression import ARModel, OLSModel, RegressionResults, SimpleRegressionResults
  from nilearn.image import get_data
  from nilearn.interfaces.bids import get_bids_files, parse_bids_filename
  from nilearn.interfaces.bids.query import infer_repetition_time_from_dataset, infer_slice_timing_start_time_from_dataset
  from nilearn.interfaces.bids.utils import bids_entities, check_bids_label
  from nilearn.interfaces.fmriprep.load_confounds import load_confounds
label_desc: Use image node_id 11 for calling a global function with example usage: _check_repetition_time(t_r) without return types