code: def check_greater(
      x1, x2, allow_equal=False, message="", as_array=True
  ):
      def comp_fn(x1, x2):
          return ivy.any(x1 < x2), ivy.any(x1 <= x2)
  
      if not as_array:
  
          def iter_comp_fn(x1_, x2_):
              return any(x1 < x2 for x1, x2 in zip(x1_, x2_)), any(
                  x1 <= x2 for x1, x2 in zip(x1_, x2_)
              )
  
          def comp_fn(x1, x2):  # noqa F811
              return iter_comp_fn(*_broadcast_inputs(x1, x2))
  
      lt, lt_eq = comp_fn(x1, x2)
      # greater_equal
      if allow_equal and lt:
          raise ivy.utils.exceptions.IvyException(
              f"{x1} must be greater than or equal to {x2}"
              if message == ""
              else message
          )
      elif not allow_equal and lt_eq:
          raise ivy.utils.exceptions.IvyException(
              f"{x1} must be greater than {x2}"
              if message == ""
              else message
          )
  
imports: import ivy
label_desc: Use image node_id 3 for calling a global function with example usage: check_greater(x1, x2, allow_equal, message, as_array) and returns: ivy,  ivy, any,  any, iter_comp_fn