How to get worker (numeric) ID or processes (numeric) ID in a node?

I am submitting jobs to GPU node and each node will be fit by 4 jobs, so each job will see different set of GPUs: (0,1), (2,3), (4,5), (6,7). I need process ID or worker ID in numbers to determine the visible GPUs for each submitted job. How do I get these information? get_worker().id only gives encrypted worker ID in letters. Thanks.

Thanks for the question @llodds. IIUC you should be able to get what you want by running os.getpid() on each worker like this

In [1]: from distributed import Client

In [2]: c = Client()

In [3]: def get_pid():
   ...:     import os
   ...:     return os.getpid()
   ...:

In [4]: c.run(get_pid)
Out[4]:
{'tcp://127.0.0.1:64324': 93100,
 'tcp://127.0.0.1:64325': 93099,
 'tcp://127.0.0.1:64326': 93101,
 'tcp://127.0.0.1:64333': 93102}