class_docstr: Compute effect of treatment using a generalized linear model such as logistic regression.
  
  Implementation uses statsmodels.api.GLM.
  Needs an additional parameter, "glm_family" to be specified in method_params. The value of this parameter can be any valid statsmodels.api families object. For example, to use logistic regression, specify "glm_family" as statsmodels.api.families.Binomial().
code: def predict_fn(self, data: pd.DataFrame, model, features):
      # Checking if Y is binary
      outcome_values = (
          data[self._target_estimand.outcome_variable[0]]
          .astype(int)
          .unique()
      )
      outcome_is_binary = all([v in [0, 1] for v in outcome_values])
  
      if outcome_is_binary:
          if self.predict_score:
              return model.predict(features)
          else:
              return (model.predict(features) > 0.5).astype(int)
      else:
          return model.predict(features)
  
file_path: dowhy/dowhy/causal_estimators/generalized_linear_model_estimator.py
imports: import itertools
  from typing import Any, List, Optional, Union
  import pandas
  import statsmodels.api
  from dowhy.causal_estimator import CausalEstimator
  from dowhy.causal_estimators.regression_estimator import RegressionEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
label_desc: Use image node_id 4 for calling the GeneralizedLinearModelEstimator obj's underlying member method code with example usage: obj.predict_fn(data, model, features) and returns: model, model, unknown