code: def get_label_mapping(dataset_name, ranges):
      if dataset_name == "imagenet":
          label_mapping = None
      elif dataset_name == "restricted_imagenet":
  
          def label_mapping(classes, class_to_idx):
              return restricted_label_mapping(
                  classes, class_to_idx, ranges=ranges
              )
  
      elif dataset_name == "custom_imagenet":
  
          def label_mapping(classes, class_to_idx):
              return custom_label_mapping(
                  classes, class_to_idx, ranges=ranges
              )
  
      else:
          raise ValueError("No such dataset_name %s" % dataset_name)
  
      return label_mapping
  
imports: import torch
  import shutil
  import dill
  import os
  from subprocess import Popen, PIPE
  import pandas
  from PIL import Image
  from .None import constants
label_desc: Use image node_id 5 for calling a global function with example usage: get_label_mapping(dataset_name, ranges) and returns: label_mapping, restricted_label_mapping, custom_label_mapping