code: def check_p_conditions(p, t_groups):
      eps = np.finfo(float).eps
      assert isinstance(
          p, (np.ndarray, pd.Series, dict)
      ), "p must be an np.ndarray, pd.Series, or dict type"
      if isinstance(p, (np.ndarray, pd.Series)):
          assert (
              t_groups.shape[0] == 1
          ), "If p is passed as an np.ndarray, there must be only 1 unique non-control group in the treatment vector."
          assert (0 + eps < p).all() and (
              p < 1 - eps
          ).all(), (
              "The values of p should lie within the (0, 1) interval."
          )
  
      if isinstance(p, dict):
          for t_name in t_groups:
              assert (0 + eps < p[t_name]).all() and (
                  p[t_name] < 1 - eps
              ).all(), "The values of p should lie within the (0, 1) interval."
  
file_path: causalml/causalml/inference/meta/utils.py
imports: import pandas
  import numpy
  from packaging import version
  from xgboost import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: check_p_conditions(p, t_groups) without return types