code: def get_trendline_results(fig):
      """
      Extracts fit statistics for trendlines (when applied to figures generated with
      the `trendline` argument set to `"ols"`).
  
      Arguments:
          fig: the output of a `plotly.express` charting call
      Returns:
          A `pandas.DataFrame` with a column "px_fit_results" containing the `statsmodels`
          results objects, along with columns identifying the subset of the data the
          trendline was fit on.
      """
      return fig._px_trendlines
  
imports: import plotly.graph_objs
  import plotly.io
  from collections import namedtuple, OrderedDict
  from ._special_inputs import IdentityMap, Constant, Range
  from .trendline_functions import ols, lowess, rolling, expanding, ewm
  from _plotly_utils.basevalidators import ColorscaleValidator
  from plotly.colors import qualitative, sequential
  import math
  from packaging import version
  import pandas
  import numpy
  from plotly._subplots import make_subplots, _set_trace_grid_reference, _subplot_type_for_trace_type
label_desc: Use image node_id 2 for calling a global function with example usage: get_trendline_results(fig) and returns: fig