def func_is_3d(in_file):
 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

def func_is_3d ( in_file ) : 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
checks if input functional files are 3d .