parameters: ()
return_statement: return os.getppid() if use_multiprocessing else os.getpid()
docstring: Returns the PID used for host_forwarder initialization.
  
      In case multi-process sharding is used, the PID of the "sharder" is used.
      The "sharder" is the initial process that forks that is the parent process.
      By default, multi-processing is not used. In that case the PID of the
      current process is returned.
docstring_summary: Returns the PID used for host_forwarder initialization.
docstring_tokens: Returns the PID used for host_forwarder initialization .
function: def _GetPidForLock():
      """Returns the PID used for host_forwarder initialization.
  
      In case multi-process sharding is used, the PID of the "sharder" is used.
      The "sharder" is the initial process that forks that is the parent process.
      By default, multi-processing is not used. In that case the PID of the
      current process is returned.
      """
      use_multiprocessing = Forwarder._MULTIPROCESSING_ENV_VAR in os.environ
      return os.getppid() if use_multiprocessing else os.getpid()
function_tokens: def _GetPidForLock ( ) : use_multiprocessing = Forwarder . _MULTIPROCESSING_ENV_VAR in os . environ return os . getppid ( ) if use_multiprocessing else os . getpid ( )