code: def _point_estimate(
      X_val,
      XM_val,
      M_val,
      y_val,
      idx,
      n_mediator,
      mtype="linear",
      **logreg_kwargs,
  ):
      """Point estimate of indirect effect based on bootstrap sample."""
      # Mediator(s) model (M(j) ~ X + covar)
      beta_m = []
      for j in range(n_mediator):
          if mtype == "linear":
              beta_m.append(
                  linear_regression(
                      X_val[idx], M_val[idx, j], coef_only=True
                  )[1]
              )
          else:
              beta_m.append(
                  logistic_regression(
                      X_val[idx],
                      M_val[idx, j],
                      coef_only=True,
                      **logreg_kwargs,
                  )[1]
              )
  
      # Full model (Y ~ X + M + covar)
      beta_y = linear_regression(
          XM_val[idx], y_val[idx], coef_only=True
      )[2 : (2 + n_mediator)]
  
      # Point estimate
      return beta_m * beta_y
  
file_path: pingouin/pingouin/regression.py
imports: import itertools
  import warnings
  import numpy
  import pandas
  import pandas_flavor
  from scipy.stats import t, norm
  from scipy.linalg import pinvh, lstsq
  from pingouin.config import options
  from pingouin.utils import remove_na
  from pingouin.utils import _flatten_list
  from pingouin.utils import _postprocess_dataframe
label_desc: Use image node_id 4 for calling a global function with example usage: _point_estimate(X_val, XM_val, M_val, y_val, idx, n_mediator, mtype) and returns: unknown