code: def bincount(x, weights=None, minlength=0, *, length=None):
      x_list = [int(x[i]) for i in range(x.shape[0])]
      max_val = int(ivy.max(ivy.array(x_list)))
      ret = [x_list.count(i) for i in range(0, max_val + 1)]
      ret = ivy.array(ret)
      ret = ivy.astype(ret, ivy.as_ivy_dtype(ivy.int64))
      return ret
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back, handle_jax_dtype
  from ivy.functional.frontends.jax.numpy import promote_types_of_jax_inputs
  from ivy.functional.backends.jax.experimental.elementwise import _normalize_axis_tuple
label_desc: Use image node_id 3 for calling a global function with example usage: bincount(x, weights, minlength) and returns: ret