code: 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()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import datetime
  import gzip
  import os
  import re
  import urllib
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: wet_records_from_file_obj(f, take_ownership) without return types