code: def get_fit_params(method=DEFAULT_METHOD):
      """Returns parameters for
      `greykite.algo.reconcile.convex.reconcile_forecasts.ReconcileAdditiveForecasts.fit`
      corresponding to recognized hierarchical reconciliation method.
  
      Parameters
      ----------
      method : `str`, default `~greykite.algo.reconcile.convex.reconcile_forecasts.DEFAULT_METHOD`
          Which reconciliation method to use.
          Valid values are "bottom_up", "ols", "mint_sample", "custom":
  
              - "bottom_up"   : Sums leaf nodes. Unbiased transform that uses only the values of the leaf nodes
                                to propagate up the tree. Each node's value is the sum of its
                                corresponding leaf nodes' values (a leaf node corresponds to a node T if it is
                                a leaf node of the subtree with T as its root, i.e. a descendant of T or T itself).
                                See Dangerfield and Morris 1992 "Top-down or bottom-up: Aggregate versus disaggregate
                                extrapolations" for one discussion of this method.
                                Depends only on the structure of the hierarchy, not on the data itself.
              - "ols"         : OLS estimate proposed by https://robjhyndman.com/papers/Hierarchical6.pdf
                                (Hyndman et al. 2010, "Optimal combination forecasts for hierarchical time series")
                                Also see https://robjhyndman.com/papers/mint.pdf section 2.4.1.
                                (Wickramasuriya et al. 2019 "Optimal forecast reconciliation for
                                hierarchical and grouped time series through trace minimization".)
                                Unbiased transform that minimizes variance of adjusted residuals,
                                using "identity" estimate of original residual variance.
                                Optimal if original forecast errors are uncorrelated with equal variance (unlikely).
                                Depends only on the structure of the hierarchy, not on the data itself.
              - "mint_sample" : Unbiased transform that minimizes variance of adjusted residuals,
                                using "sample" estimate of original residual variance.
                                Assumes base forecasts are unbiased.
                                See Wickramasuriya et al. 2019 section 2.4.4.
                                Depends on the structure of the hierarchy and forecast error covariances.
              - "custom"      : Optimization parameters can be set by the user. See
                                `greykite.algo.reconcile.convex.reconcile_forecasts.ReconcileAdditiveForecasts.fit`
                                method for parameters and their default values.
                                Depends on the structure of the hierarchy, base forecasts, and actuals, if all terms
                                are included in the objective.
  
          If "custom", uses the parameters passed to
          `greykite.algo.reconcile.convex.reconcile_forecasts.ReconcileAdditiveForecasts.fit`
          to formulate the convex optimization problem.
  
          If "bottom_up", "ols", or "mint_sample", the other fit parameters are ignored.
  
      Returns
      -------
      estimator_fit_params : `dict` [`str`, Any]
          Parameters to use when calling ``ReconcileAdditiveForecasts.fit()``.
      """
      if method == "custom":
          estimator_fit_params = (
              {}
          )  # uses default values of ``fit`` and those passed by user
      elif method == "bottom_up":
          logging.info("Using bottom_up estimator")
          estimator_fit_params = (
              {}
          )  # already passed to ``fit`` via ``method``
      elif method == "ols":
          logging.info("Using ols estimator")
          estimator_fit_params = dict(
              lower_bound=None,
              upper_bound=None,
              unbiased=True,  # unbiased
              lam_adj=0.0,
              lam_bias=0.0,
              lam_train=0.0,
              lam_var=1.0,  # minimizes variance
              covariance="identity",  # assumes equal uncorrelated variance
              weight_adj=None,
              weight_bias=None,
              weight_train=None,
              weight_var=None,
          )
      elif method == "mint_sample":
          logging.info("Using mint_sample estimator")
          estimator_fit_params = dict(
              lower_bound=None,
              upper_bound=None,
              unbiased=True,  # unbiased
              lam_adj=0.0,
              lam_bias=0.0,
              lam_train=0.0,
              lam_var=1.0,  # minimizes variance
              covariance="sample",  # in-sample variance estimate
              weight_adj=None,
              weight_bias=None,
              weight_train=None,
              weight_var=None,
          )
      else:
          raise ValueError(
              f"`method` '{method}' is not recognized. "
              f"Must be one of 'bottom_up', 'ols', 'mint_sample', 'custom'"
          )
      return estimator_fit_params
  
imports: import functools
  import logging
  import math
  import sys
  import warnings
  from dataclasses import dataclass
  from typing import Optional
  import cvxpy
  import numpy
  import pandas
  import plotly
  import plotly.express
  from plotly import graph_objects
  from plotly.subplots import make_subplots
  from scipy.linalg import sqrtm
  from sklearn.exceptions import NotFittedError
  from greykite.algo.reconcile.hierarchical_relationship import HierarchicalRelationship
  from greykite.common.python_utils import reorder_columns
label_desc: Use image node_id 2 for calling a global function with example usage: get_fit_params(method) and returns: estimator_fit_params