code: def update_training_time(selected_date, mode, comp_opt):
      try:
          filter_df = model_df[model_df["mode"] == mode]
          filter_df = filter_df[filter_df["date"] == selected_date]
          filter_df, color = process_comparison_options(
              filter_df, comp_opt
          )
      except KeyError:
          filter_df = pd.DataFrame()
  
      if filter_df.empty:
          return render_emtpy_figure()
  
      fig = px.bar(
          filter_df,
          x="inference time",
          text="inference time",
          y="model",
          color=color,
          orientation="h",
          barmode="group",
          color_discrete_sequence=colors_discrete,
          template=template,
          title="Model Inference Time",
      )
      fig.update_layout(
          xaxis={"range": [0, filter_df["inference time"].max() * 1.1]},
          xaxis_title="inference time in seconds",
      )
      fig.update_traces(
          texttemplate="%{text:.2f}", textposition="outside"
      )
      return fig
  
imports: import pathlib
  import dash
  import dash_core_components
  import dash_html_components
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  from dash.dependencies import Input, Output
  from load_data import get_aggregated_data, get_available_dates
  from plotly.subplots import make_subplots
label_desc: Use image node_id 8 for calling a global function with example usage: update_training_time(selected_date, mode, comp_opt) and returns: fig, render_emtpy_figure