code: def equal_condition_result(
      is_pass: bool,
      name: str,
      details: Union[str, Pattern] = "",
      category: Optional[ConditionCategory] = None,
  ) -> Matcher[Matcher[object]]:
      if category is None:
          possible_categories = (
              [ConditionCategory.PASS]
              if is_pass
              else [ConditionCategory.FAIL, ConditionCategory.WARN]
          )
      else:
          possible_categories = [category]
  
      # Check if details is a regex class
      if hasattr(details, "match"):
          details_matcher = matches_regexp(details)
      else:
          details_matcher = details
  
      return all_of(
          has_property("category", is_in(possible_categories)),
          has_property("details", details_matcher),
          has_property("name", name),
      )
  
imports: import re
  from typing import Optional, Pattern, Union
  from hamcrest import all_of, has_property, is_in, matches_regexp
  from hamcrest.core.matcher import Matcher
  from deepchecks.core import ConditionCategory
label_desc: Use image node_id 1 for calling a global function with example usage: equal_condition_result(is_pass, name, details, category) and returns: all_of