parameters: (
          self,
          candidates,      # type: List[InstallationCandidate]
      )
return_statement: return BestCandidateResult(
              candidates,
              applicable_candidates=applicable_candidates,
              best_candidate=best_candidate,
          )
docstring: Compute and return a `BestCandidateResult` instance.
docstring_summary: Compute and return a `BestCandidateResult` instance.
docstring_tokens: Compute and return a BestCandidateResult instance .
function: def compute_best_candidate(
          self,
          candidates,      # type: List[InstallationCandidate]
      ):
          # type: (...) -> BestCandidateResult
          """
          Compute and return a `BestCandidateResult` instance.
          """
          applicable_candidates = self.get_applicable_candidates(candidates)
  
          best_candidate = self.sort_best_candidate(applicable_candidates)
  
          return BestCandidateResult(
              candidates,
              applicable_candidates=applicable_candidates,
              best_candidate=best_candidate,
          )
function_tokens: def compute_best_candidate ( self , candidates , # type: List[InstallationCandidate] ) : # type: (...) -> BestCandidateResult applicable_candidates = self . get_applicable_candidates ( candidates ) best_candidate = self . sort_best_candidate ( applicable_candidates ) return BestCandidateResult ( candidates , applicable_candidates = applicable_candidates , best_candidate = best_candidate , )