code: def finalize(self):
          
          # Get the metric name
          metric = self.scoring_metric.__name__.replace("_", " ").title()
  
          # Set the title
          self.set_title(
              '{} Elbow for {} Clustering'.format(metric, self.name)
          )
  
          # Set the x and y labels
          self.ax.set_xlabel('k')
          self.ax.set_ylabel(metric.lower())
          
          #set the legend if locate_elbow=True
          if self.locate_elbow and self.elbow_value_!=None:
              self.ax.legend(loc='best', fontsize='medium')
  
          # Set the second y axis labels
          if self.timings:
              self.axes[1].grid(False)
              self.axes[1].set_ylabel("fit time (seconds)", color='g')
              self.axes[1].tick_params('y', colors='g')
docs: Prepare the figure for rendering by setting the title as well as the
          X and Y axis labels and adding the legend.