code: def filter_classes(objects, only_classes=None, ignore_classes=None):
      if ignore_classes:
          objects = [
              o for o in objects if o["label"] not in ignore_classes
          ]
  
      if only_classes:
          objects = [o for o in objects if o["label"] in only_classes]
  
      return objects
  
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 3 for calling a global function with example usage: filter_classes(objects, only_classes, ignore_classes) and returns: objects