code: def check_all_or_any_fn(
      *args,
      fn,
      type="all",
      limit=(0,),
      message="args must exist according to type and limit given",
      as_array=True,
  ):
      if type == "all":
          check_all(
              [fn(arg) for arg in args], message, as_array=as_array
          )
      elif type == "any":
          count = 0
          for arg in args:
              count = count + 1 if fn(arg) else count
          if count not in limit:
              raise ivy.utils.exceptions.IvyException(message)
      else:
          raise ivy.utils.exceptions.IvyException(
              "type must be all or any"
          )
  
imports: import ivy
label_desc: Use image node_id 12 for calling a global function with example usage: check_all_or_any_fn() without return types