code: def kthvalue(x, k, axis=None, keepdim=False, name=None):
      if axis is None:
          axis = -1
      sorted_input = ivy.sort(x, axis=axis)
      sort_indices = ivy.argsort(x, axis=axis)
  
      values = ivy.gather(sorted_input, ivy.array(k - 1), axis=axis)
      indices = ivy.gather(sort_indices, ivy.array(k - 1), axis=axis)
  
      if keepdim:
          values = ivy.expand_dims(values, axis=axis)
          indices = ivy.expand_dims(indices, axis=axis)
  
      ret = (values, indices)
      return ret
  
file_path: ivy/ivy/functional/frontends/paddle/search.py
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 5 for calling a global function with example usage: kthvalue(x, k, axis, keepdim, name) and returns: ret