class_docstr: This class is supposed to be created by internal Jedi architecture. You
  should not create it directly. Please use create_environment or the other
  functions instead. It is then returned by that function.
class_docstr_tok: ["This","class","is","supposed","to","be","created","by","internal","Jedi","architecture",".","You","should","not","create","it","directly",".","Please","use","create_environment","or","the","other","functions","instead",".","It","is","then","returned","by","that","function","."]
code: def _get_subprocess(self):
      if (
          self._subprocess is not None
          and not self._subprocess.is_crashed
      ):
          return self._subprocess
  
      try:
          self._subprocess = CompiledSubprocess(self._start_executable)
          info = self._subprocess._send(None, _get_info)
      except Exception as exc:
          raise InvalidPythonEnvironment(
              "Could not get version information for %r: %r"
              % (self._start_executable, exc)
          )
  
      # Since it could change and might not be the same(?) as the one given,
      # set it here.
      self.executable = info[0]
      """
          The Python executable, matches ``sys.executable``.
          """
      self.path = info[1]
      """
          The path to an environment, matches ``sys.prefix``.
          """
      self.version_info = _VersionInfo(*info[2])
      """
          Like ``sys.version_info``. A tuple to show the current Environment's
          Python version.
          """
  
      # py2 sends bytes via pickle apparently?!
      if self.version_info.major == 2:
          self.executable = self.executable.decode()
          self.path = self.path.decode()
  
      # Adjust pickle protocol according to host and client version.
      self._subprocess._pickle_protocol = highest_pickle_protocol(
          [sys.version_info, self.version_info]
      )
  
      return self._subprocess
  
imports: import os
  import sys
  import hashlib
  import filecmp
  from collections import namedtuple
  from jedi._compatibility import highest_pickle_protocol, which
  from jedi.cache import memoize_method, time_cache
  from jedi.evaluate.compiled.subprocess import CompiledSubprocess, EvaluatorSameProcess, EvaluatorSubprocess
  import parso
label_desc: Use image node_id 2 for calling the Environment obj's underlying member method code with example usage: obj._get_subprocess() and returns: self, self