def get_pid(pid=None):
    '''get_pid will return a pid of interest. First we use given variable,
    then environmental variable PID, and then PID of running process
    '''
    if pid == None:
        if os.environ.get("PID",None) != None:
            pid = int(os.environ.get("PID"))
        # Then use current running script as process
        else:
            pid = os.getpid()
    print("pid is %s" %pid)
    return pid
get_pid will return a pid of interest. First we use given variable,
    then environmental variable PID, and then PID of running process