class_docstr: Class for storing a causal estimand, as a result of the identification step using the ID algorithm.
  The object stores a list of estimators(self._product) whose porduct must be obtained and a list of variables (self._sum) over which the product must be marginalized.
class_docstr_tok: ["Class","for","storing","a","causal","estimand",",","as","a","result","of","the","identification","step","using","the","ID","algorithm",".","The","object","stores","a","list","of","estimators","(","self._product",")","whose","porduct","must","be","obtained","and","a","list","of","variables","(","self._sum",")","over","which","the","product","must","be","marginalized","."]
docstr: Print the IDExpression object.
docstr_tok: ["Print","the","IDExpression","object","."]
code: def _print_estimator(
      self,
      prefix,
      estimator: Union[Dict, "IDExpression"] = None,
      start: bool = False,
  ):
      """
      Print the IDExpression object.
      """
      if estimator is None:
          return None
  
      string = ""
      if isinstance(estimator, IDExpression):
          s = (
              True
              if len(estimator.get_val(return_type="sum")) > 0
              else False
          )
          if s:
              sum_vars = (
                  "{"
                  + ",".join(estimator.get_val(return_type="sum"))
                  + "}"
              )
              string += prefix + "Sum over " + sum_vars + ":\n"
              prefix += "\t"
          for expression in estimator.get_val(return_type="prod"):
              add_string = self._print_estimator(prefix, expression)
              if add_string is None:
                  return None
              else:
                  string += add_string
      else:
          outcome_vars = list(estimator["outcome_vars"])
          condition_vars = list(estimator["condition_vars"])
          string += prefix + "Predictor: P(" + ",".join(outcome_vars)
          if len(condition_vars) > 0:
              string += "|" + ",".join(condition_vars)
          string += ")\n"
      if start:
          string = string[:-1]
      return string
  
file_path: dowhy/dowhy/causal_identifier/id_identifier.py
imports: from typing import Dict, List, Optional, Set, Union
  import networkx
  import numpy
  from dowhy.graph import get_adjacency_matrix
  from dowhy.utils.api import parse_state
  from dowhy.utils.graph_operations import find_ancestor, find_c_components, induced_graph
  from dowhy.utils.ordered_set import OrderedSet
label_desc: Use image node_id 5 for calling the IDExpression obj's underlying member method code with example usage: obj._print_estimator(prefix, estimator, start) and returns: string, None, None