code: def get_process_pid(process_name):
      
      try:
          pid_filename = get_pid_filename(process_name)
          with open(pid_filename, mode='r') as pid_file:
              pid = int(pid_file.read().strip())
      except IOError:
          pid = None
      return pid
docs: check for process' pid file and returns pid from there