docs: def processes_with_env_ps(env_name, env_value):
      """
      Find PIDs of processes having environment variable matching given one.
  
      It uses `$ ps xe -o pid,cmd` command so it works only on systems
      having such command available (Linux, MacOS). If not available function
      will just log error.
  
      :param str env_name: name of environment variable to be found
      :param str env_value: environment variable value prefix
      :return: process identifiers (PIDs) of processes that have certain
               environment variable equal certain value
      :rtype: set
      """
      pids = set()
      ps_xe = ''
      try:
          cmd = 'ps', 'xe', '-o', 'pid,cmd'
          ps_xe = subprocess.check_output(cmd).splitlines()
      except OSError as err:
          if err.errno == errno.ENOENT:
              log.error("`$ ps xe -o pid,cmd` command was called but it is not "
                        "available on this operating system. Mirakuru will not "
                        "be able to list the process tree and find if there are "
                        "any leftovers of the Executor.")
              return pids
      except subprocess.CalledProcessError:
          log.error("`$ ps xe -o pid,cmd` command exited with non-zero code.")
  
      env = '{0}={1}'.format(env_name, env_value)
  
      for line in ps_xe:
          line = str(line)
          if env in line:
              pids.add(int(PS_XE_PID_MATCH.match(line).group(1)))
      return pids