code: def _get_risk_analysis_data_with_report(
      report_normal_df: pd.DataFrame,
      # report_long_short_df: pd.DataFrame,
      date: pd.Timestamp,
  ) -> pd.DataFrame:
      """Get risk analysis data with report
  
      :param report_normal_df: report data
      :param report_long_short_df: report data
      :param date: date string
      :return:
      """
  
      analysis = dict()
      # if not report_long_short_df.empty:
      #     analysis["pred_long"] = risk_analysis(report_long_short_df["long"])
      #     analysis["pred_short"] = risk_analysis(report_long_short_df["short"])
      #     analysis["pred_long_short"] = risk_analysis(report_long_short_df["long_short"])
  
      if not report_normal_df.empty:
          analysis["excess_return_without_cost"] = risk_analysis(
              report_normal_df["return"] - report_normal_df["bench"]
          )
          analysis["excess_return_with_cost"] = risk_analysis(
              report_normal_df["return"]
              - report_normal_df["bench"]
              - report_normal_df["cost"]
          )
      analysis_df = pd.concat(analysis)  # type: pd.DataFrame
      analysis_df["date"] = date
      return analysis_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 1 for calling a global function with example usage: _get_risk_analysis_data_with_report(report_normal_df, date) and returns: analysis_df