code: def find_compatible_interpreters(pex_python_path=None, compatibility_constraints=None):
    
    if pex_python_path:
      interpreters = []
      for binary in pex_python_path.split(os.pathsep):
        try:
          interpreters.append(PythonInterpreter.from_binary(binary))
        except Executor.ExecutionError:
          print("Python interpreter %s in PEX_PYTHON_PATH failed to load properly." % binary,
            file=sys.stderr)
      if not interpreters:
        die('PEX_PYTHON_PATH was defined, but no valid interpreters could be identified. Exiting.')
    else:
      # We may have been invoked with a specific interpreter not on the $PATH, make sure our
      # sys.executable is included as a candidate in this case.
      interpreters = OrderedSet([PythonInterpreter.get()])
  
      # Add all qualifying interpreters found in $PATH.
      interpreters.update(PythonInterpreter.all())
  
    return list(
      matched_interpreters(interpreters, compatibility_constraints)
      if compatibility_constraints
      else interpreters
    )
docs: Find all compatible interpreters on the system within the supplied constraints and use
       PEX_PYTHON_PATH if it is set. If not, fall back to interpreters on $PATH.