Creating custom functions of control rig

Hi, I have create control rig functions and would like to share it with other rigs. I have put them in StandardLibraryFunctions. I can access the functions but I get
Function referenced in leg_3chain_rig_by_tag using external variable not found in the current rig.
I have some global variables defined in the class for metadata and tags. I find out that I am getting the errors because of them. After localizing them in their used functions error is gone. However, is there a setting in the class so that I can access the global variables of the class too?
image