code: def _get_virtual_env_from_var():
      """Get virtualenv environment from VIRTUAL_ENV environment variable.
  
      It uses `safe=False` with ``create_environment``, because the environment
      variable is considered to be safe / controlled by the user solely.
      """
      var = os.environ.get("VIRTUAL_ENV")
      if var:
          if var == sys.prefix:
              return _try_get_same_env()
  
          try:
              return create_environment(var, safe=False)
          except InvalidPythonEnvironment:
              pass
  
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 a global function with example usage: _get_virtual_env_from_var() and returns: _try_get_same_env, create_environment