docstr: Aggregates the target or prediction variable based on the plot type specified
  in `self.plot_type`.
  
  Depending on `self.plot_type`, this function employs different strategies to
  aggregate:
  
  - If `self.plot_type` is 'target', it calculates the mean of the target
  variable for each feature bucket 'x'.
  - If `self.plot_type` is 'predict', it calculates the first quartile, median
  (second quartile), and third quartile of the prediction variable for each
  feature bucket 'x'.
  
  The results of these aggregation operations are then stored in
  `self.target_lines`.
  
  Additionally, this function updates `self.summary_df` with the aggregate
  results to provide a summarized view of the target or prediction variable
  across different feature buckets.
docstr_tok: ["Aggregates","the","target","or","prediction","variable","based","on","the","plot","type","specified","in","`","self.plot_type","`",".","Depending","on","`","self.plot_type","`",",","this","function","employs","different","strategies","to","aggregate",":","-","If","`","self.plot_type","`","is","'target","'",",","it","calculates","the","mean","of","the","target","variable","for","each","feature","bucket","'","x","'",".","-","If","`","self.plot_type","`","is","'predict","'",",","it","calculates","the","first","quartile",",","median","(","second","quartile",")",",","and","third","quartile","of","the","prediction","variable","for","each","feature","bucket","'","x","'",".","The","results","of","these","aggregation","operations","are","then","stored","in","`","self.target_lines","`",".","Additionally",",","this","function","updates","`","self.summary_df","`","with","the","aggregate","results","to","provide","a","summarized","view","of","the","target","or","prediction","variable","across","different","feature","buckets","."]
code: def agg_target(self):
      """
      Aggregates the target or prediction variable based on the plot type specified
      in `self.plot_type`.
  
      Depending on `self.plot_type`, this function employs different strategies to
      aggregate:
  
      - If `self.plot_type` is 'target', it calculates the mean of the target
      variable for each feature bucket 'x'.
      - If `self.plot_type` is 'predict', it calculates the first quartile, median
      (second quartile), and third quartile of the prediction variable for each
      feature bucket 'x'.
  
      The results of these aggregation operations are then stored in
      `self.target_lines`.
  
      Additionally, this function updates `self.summary_df` with the aggregate
      results to provide a summarized view of the target or prediction variable
      across different feature buckets.
      """
      if self.plot_type == "target":
  
          def _agg_target(t):
              return (
                  self.df.groupby("x", as_index=False)
                  .agg({t: "mean"})
                  .sort_values("x", ascending=True)
              )
  
      else:
  
          def _agg_target(t):
              target_line = (
                  self.df.groupby("x", as_index=False)
                  .agg({t: [_q1, _q2, _q3]})
                  .sort_values("x", ascending=True)
              )
              target_line.columns = [
                  "".join(col) if col[1] != "" else col[0]
                  for col in target_line.columns
              ]
              return target_line
  
      self.target_lines = [_agg_target(t) for t in self.target]
      for target_line in self.target_lines:
          self.summary_df = self.summary_df.merge(
              target_line, on="x", how="outer"
          )
  
imports: from .info_plot_utils import TargetPlotEngine, PredictPlotEngine, InteractInfoPlotEngine
  from .utils import _make_list, _check_target, _q1, _q2, _q3, FeatureInfo, _check_dataset, _check_model, _calc_preds, _check_classes, _expand_params_for_interact
  import pandas
  from itertools import product
label_desc: Use image node_id 3 for calling the _InfoPlot obj's underlying member method code with example usage: obj.agg_target() and returns: self, target_line