code: def func_is_3d(in_file):
      """Checks if input functional files are 3d."""
  
      if isinstance(in_file, list):
          return func_is_3d(in_file[0])
      else:
          img = load(in_file)
          shape = img.shape
          if len(shape) == 3 or (len(shape) == 4 and shape[3] == 1):
              return True
          else:
              return False
  
imports: import os
  from copy import deepcopy
  from nibabel import load
  import numpy
  from ...None import logging
  from ...utils import spm_docs
  from ..base import BaseInterface, traits, isdefined, InputMultiPath, BaseInterfaceInputSpec, Directory, Undefined, ImageFile, PackageInfo
  from ..base.traits_extension import NoDefaultSpecified
  from ..matlab import MatlabCommand
  from ...external.due import due, Doi, BibTeX
label_desc: Use image node_id 1 for calling a global function with example usage: func_is_3d(in_file) and returns: func_is_3d, True, False