code: def create_scipy_stats_model_from_lifelines_model(model):
      from lifelines.fitters import KnownModelParametricUnivariateFitter
  
      is_univariate_model = isinstance(
          model, KnownModelParametricUnivariateFitter
      )
      dist = get_distribution_name_of_lifelines_model(model)
  
      if not (is_univariate_model):
          raise TypeError(
              "Cannot use qq-plot with this model. See notes here: https://lifelines.readthedocs.io/en/latest/Examples.html?highlight=qq_plot#selecting-a-parametric-model-using-qq-plots"
          )
      if dist == "weibull":
          scipy_dist = "weibull_min"
          sparams = (model.rho_, 0, model.lambda_)
      elif dist == "lognormal":
          scipy_dist = "lognorm"
          sparams = (model.sigma_, 0, np.exp(model.mu_))
      elif dist == "loglogistic":
          scipy_dist = "fisk"
          sparams = (model.beta_, 0, model.alpha_)
      elif dist == "exponential":
          scipy_dist = "expon"
          sparams = (0, model.lambda_)
      else:
          raise NotImplementedError(
              "Distribution not implemented in SciPy"
          )
      return getattr(stats, scipy_dist)(*sparams)
  
imports: import warnings
  from typing import Union, Optional, Iterable
  from scipy import stats
  import pandas
  import numpy
  from lifelines.utils import coalesce, CensoringType, _group_event_table_by_intervals
label_desc: Use image node_id 3 for calling a global function with example usage: create_scipy_stats_model_from_lifelines_model(model) and returns: getattr