code: def compute_boolean_conditioning_vector(
      X, feature_names, condition=None
  ):
      """Compute the boolean conditioning vector.
  
      Args:
          X (numpy.ndarray): Dataset features
          feature_names (list): Names of the features.
          condition (list(dict)): Specifies the subset of instances we want to
              use. Format is a list of `dicts` where the keys are `feature_names`
              and the values are values in `X`. Elements in the list are clauses
              joined with OR operators while key-value pairs in each dict are
              joined with AND operators. See examples for more details. If `None`,
              the condition specifies the entire set of instances, `X`.
  
      Returns:
          numpy.ndarray(bool): Boolean conditioning vector. Shape is `[n]` where
          `n` is `X.shape[0]`. Values are `True` if the corresponding row
          satisfies the `condition` and `False` otherwise.
  
      Examples:
          >>> condition = [{'sex': 1, 'age': 1}, {'sex': 0}]
  
          This corresponds to `(sex == 1 AND age == 1) OR (sex == 0)`.
      """
      if condition is None:
          return np.ones(X.shape[0], dtype=bool)
  
      overall_cond = np.zeros(X.shape[0], dtype=bool)
      for group in condition:
          group_cond = np.ones(X.shape[0], dtype=bool)
          for name, val in group.items():
              index = feature_names.index(name)
              group_cond = np.logical_and(
                  group_cond, X[:, index] == val
              )
          overall_cond = np.logical_or(overall_cond, group_cond)
  
      return overall_cond
  
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: compute_boolean_conditioning_vector(X, feature_names, condition) and returns: overall_cond, np