code: def get_file_type(filename):
      extension = filename.split(".")[-1].lower()
      if extension in IMAGE_FORMATS:
          return "image"
      elif extension in VIDEO_FORMATS:
          return "video"
  
file_path: luminoth/luminoth/predict.py
imports: import click
  import json
  import numpy
  import os
  import skvideo.io
  import sys
  import time
  import tensorflow
  from PIL import Image
  from luminoth.tools.checkpoint import get_checkpoint_config
  from luminoth.utils.config import get_config, override_config_params
  from luminoth.utils.predicting import PredictorNetwork
  from luminoth.vis import build_colormap, vis_objects
label_desc: Use image node_id 1 for calling a global function with example usage: get_file_type(filename) and returns: str, str