code: def find_checkpoints(model_path: str, size=4, strategy="best", metric: str = C.PERPLEXITY) -> List[str]:
      
      maximize = C.METRIC_MAXIMIZE[metric]
      points = utils.get_validation_metric_points(model_path=model_path, metric=metric)
      # keep only points for which .param files exist
      param_path = os.path.join(model_path, C.PARAMS_NAME)
      points = [(value, checkpoint) for value, checkpoint in points if os.path.exists(param_path % checkpoint)]
  
      if strategy == "best":
          # N best scoring points
          top_n = _strategy_best(points, size, maximize)
  
      elif strategy == "last":
          # N sequential points ending with overall best
          top_n = _strategy_last(points, size, maximize)
  
      elif strategy == "lifespan":
          # Track lifespan of every "new best" point
          # Points dominated by a previous better point have lifespan 0
          top_n = _strategy_lifespan(points, size, maximize)
      else:
          raise RuntimeError("Unknown strategy, options: best last lifespan")
  
      # Assemble paths for params files corresponding to chosen checkpoints
      # Last element in point is always the checkpoint id
      params_paths = [
          os.path.join(model_path, C.PARAMS_NAME % point[-1]) for point in top_n
      ]
  
      # Report
      logger.info("Found: " + ", ".join(str(point) for point in top_n))
  
      return params_paths
docs: Finds N best points from .metrics file according to strategy.
  
      :param model_path: Path to model.
      :param size: Number of checkpoints to combine.
      :param strategy: Combination strategy.
      :param metric: Metric according to which checkpoints are selected.  Corresponds to columns in model/metrics file.
      :return: List of paths corresponding to chosen checkpoints.