docstr: Read header from file. Headers end with length and then 1 blank line.
docstr_tok: ["Read","header","from","file",".","Headers","end","with","length","and","then","1","blank","line","."]
code: def read(cls, f):
      """Read header from file. Headers end with length and then 1 blank line."""
      url = None
  
      line = f.readline()
      if not line:
          # EOF
          return None
      while not line.startswith(cls.LENGTH_HEADER):
          if line.startswith(cls.URI_HEADER):
              url = line[len(cls.URI_HEADER) :].strip()
          line = f.readline()
  
      # Consume empty separator
      f.readline()
  
      # Read content
      length = int(line.split(":")[1])
  
      return cls(url, length)
  
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 1 for calling the WETHeader obj's underlying member method code with example usage: obj.read(cls, f) and returns: cls, None