<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wet_records_from_file_obj(f, take_ownership=False):
 """Iterate through records in WET file object."""

  while True:
    record = WETRecord.read(f)

    if record is None:
      break

    if not record.url:
      continue

    yield record

  if take_ownership:
    f.close()