code: def read_mask_class_values(local_dataset_path):
      json_file_path = os.path.join(
          local_dataset_path, "_mask_legend.json"
      )
  
      json_file = open(json_file_path, "r")
      data = json.load(json_file)
      json_file.close()
  
      # now we need to convert it to pixel RGB value mapping to classes
      label_mapping = {
          tuple(value): [key] for key, value in data.items()
      }
  
      return label_mapping
  
file_path: clearml/examples/hyperdatasets/data-registration/register_dataset_masks.py
imports: import glob
  import json
  import os
  from argparse import ArgumentParser
  from allegroai import DatasetVersion, FrameGroup, SingleFrame, Task
  from clearml import StorageManager
label_desc: Use image node_id 2 for calling a global function with example usage: read_mask_class_values(local_dataset_path) and returns: label_mapping