code: def get_categorical_limit(record):
      key = get_key(record)
      return key.metadata.categorical_limit
  
imports: import logging
  from collections import namedtuple
  import numpy
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, schema, scope, utils, workspace
  from caffe2.python.layers.tags import TagContext
label_desc: Use image node_id 3 for calling a global function with example usage: get_categorical_limit(record) and returns: key