code: def _get_monthly_analysis_with_feature(
      monthly_df: pd.DataFrame, feature: str = "annualized_return"
  ) -> pd.DataFrame:
      """
  
      :param monthly_df:
      :param feature:
      :return:
      """
      _monthly_df_gp = monthly_df.reset_index().groupby(["level_1"])
  
      _name_df = _monthly_df_gp.get_group(feature).set_index(
          ["level_0", "level_1"]
      )
      _temp_df = _name_df.pivot_table(
          index="date", values=["risk"], columns=_name_df.index
      )
      _temp_df.columns = map(
          lambda x: "_".join(x[-1]), _temp_df.columns
      )
      _temp_df.index = _temp_df.index.strftime("%Y-%m")
  
      return _temp_df
  
file_path: qlib/qlib/contrib/report/analysis_position/risk_analysis.py
imports: from typing import Iterable
  import pandas
  import plotly.graph_objs
  from ...evaluate import risk_analysis
  from ..graph import SubplotsGraph, ScatterGraph
label_desc: Use image node_id 4 for calling a global function with example usage: _get_monthly_analysis_with_feature(monthly_df, feature) and returns: _temp_df