code: def get_image_modality(image_modality):
      """Change image_modality (string) to rgb (bool) and flow (bool) for efficiency"""
  
      if image_modality == "joint":
          rgb = flow = True
      elif image_modality == "rgb" or image_modality == "flow":
          rgb = image_modality == "rgb"
          flow = image_modality == "flow"
      else:
          raise Exception(
              "Invalid modality option: {}".format(image_modality)
          )
      return rgb, flow
  
imports: import os
  from copy import deepcopy
  from enum import Enum
  import torch
  import kale.prepdata.video_transform
  from kale.loaddata.dataset_access import DatasetAccess
  from kale.loaddata.video_datasets import BasicVideoDataset, EPIC
label_desc: Use image node_id 1 for calling a global function with example usage: get_image_modality(image_modality) and returns: rgb,  flow