code: def extract(cond, arr, /):
      if cond.dtype == "bool":
          return arr[cond]
      else:
          return arr[cond != 0]
  
file_path: ivy/ivy/functional/frontends/numpy/sorting_searching_counting/searching.py
imports: import ivy
  from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out
label_desc: Use image node_id 5 for calling a global function with example usage: extract() and returns: arr, arr