code: def get_first_3dfile(in_files):
      if not func_is_3d(in_files):
          return None
      if isinstance(in_files[0], list):
          return in_files[0]
      return in_files
  
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 2 for calling a global function with example usage: get_first_3dfile(in_files) and returns: in_files, None, in_files