code: def check_format(filepath):
      format_type = None
  
      if os.path.isdir(filepath):
          format_type = "dicom_dir"
      else:
          try:
              float(filepath)
              format_type = "float_string"
          except:
              for data_type in FORMAT_LIST:
                  if filepath.lower().endswith(FORMAT_LIST[data_type]):
                      format_type = data_type
                  if format_type is not None:
                      break
  
      if format_type is None:
          raise ValueError(
              "The provided file extension at {} is not an acceptable file extension for DeepNeuro.".format(
                  filepath
              )
          )
      else:
          return format_type
  
imports: import os
  import numpy
  import nibabel
  import nrrd
  import pydicom
  import subprocess
  from collections import defaultdict
  from imageio import imwrite, imread
  from deepneuro.utilities.util import grab_files_recursive, quotes
label_desc: Use image node_id 17 for calling a global function with example usage: check_format(filepath) and returns: format_type