<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_decodes(ids, vocab_size, eos_id=1):
 """Stop at EOS or padding or OOV. Args: ids: a list of integers vocab_size: an integer eos_id: EOS id Returns: a list of integers """

  ret = []
  for i in ids:
    if i == eos_id:
      break
    if i >= vocab_size:
      break
    ret.append(int(i))
  return ret