code: def read(self, fname: str) -> None:
      with open(fname) as f:
          lines = f.readlines()
          if lines[-1] != self.EOF_TOKEN:
              return
          for ln in lines:
              if ln.startswith(self.SOCK_TOKEN):
                  self._sock_port = int(ln[len(self.SOCK_TOKEN) :])
          self._valid = True
  
file_path: wandb/wandb/sdk/service/port_file.py
imports: import os
  import tempfile
  from typing import Optional
label_desc: Use image node_id 3 for calling the PortFile obj's underlying member method code with example usage: obj.read(fname) without return types