code: def from_file(cls, tag: str, f: IO[str]) -> "License":
      # Licenses are saved as a simple rfc822 format (email headers + body).
      msg = email.message_from_file(f)
      meta = {x[0].lower(): x[1] for x in msg._headers}  # type: ignore
      text = msg.get_payload()
      return cls(tag, text, **meta)
  
file_path: determined/tools/scripts/gen-attributions.py
imports: import email
  import os
  import sys
  from typing import IO, List, Optional
label_desc: Use image node_id 2 for calling the License obj's underlying member method code with example usage: obj.from_file(cls, tag, f) and returns: cls