code: def candidate_scores(self) -> numpy.typing.NDArray[numpy.float_]:
      if not self._fitted:
          raise ValueError("Must call fit() before candidate_scores()")
      if self._cached_scores is None:
          labels = self._predict(self.candidates)
          self._cached_scores = numpy.array(labels).reshape(-1, 1)
  
      return self._cached_scores
  
imports: from __future__ import annotations
  import logging
  import random
  from abc import ABC, abstractmethod
  from typing import TYPE_CHECKING, overload
  from warnings import warn
  import numpy
  import numpy.typing
  import sklearn.linear_model
  import dedupe.core
  import dedupe.training
label_desc: Use image node_id 3 for calling the BlockLearner obj's underlying member method code with example usage: obj.candidate_scores() and returns: self