Workflow locking using mutex

Hey team,
I came across a requirement where I wanted to perform locking on a resource in temporal such that if a workflow has taken a lock on that resource, other workflows are not allowed to take a lock and perform action as well as wait until the lock is released. I stumbled upon the sample for mutex workflow which kind of perform the same thing I wanted to perform but I am having some doubts on it.

If I understand the code correctly, the mutex workflow is trying to take a lock on the resource using resourceID, but the MutexWorkflow is not using the resourceID at all. If someone can help me understand this or point me in the right direction if the sample is drifted away from the original code base that would be helpful.

It is using the resourceID to generate the mutex workflowID: