Setting node_group_key in a hook


I have a problem while writing a queuejob hook. Im struggling to set node_group_key. Im following Section (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.