// create a key considering the resource and variable, and check if key exists in the global map:
// if it doesn't, set the variable to zero.
// create a key considering the resource and variable, and check if key exists in the global map:
// if it doesn't, set the variable to zero.