Setting node_group_key in a hook

Hello,

I have a problem while writing a queuejob hook. Im struggling to set node_group_key. Im following Section 5.2.4.3 (Plugins (Hooks) Guide) but it seems im missing something or doing something wrong. The way I already tried is:

pbs.event().job.node_group_key = pbs.node_group_key(“Resource_Name”)
pbs.event().job.Resource_List[“node_group_key”] = “Resource_Name”

The resource Im specified it does actually exists.

Am I missing something?

Much appreciate your support.