code: def log_file(request: pytest.FixtureRequest) -> Iterator[IO[str]]:
      with open(request.config.option.log_file, "w") as f:
          # Clean-out any existing log-file
          f.write("")
      with open(request.config.option.log_file, "a") as f:
          yield f
  
imports: from __future__ import annotations
  import logging
  from typing import IO, Iterator
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: log_file(request) without return types