code: def _write_image(
      path: "StrPath",
      revision: str,
      filename: str,
      image_data: bytes,
  ) -> "StrPath":
      img_path = os.path.join(
          path,
          f"{revision}_{filename}".replace(os.sep, "_").replace(
              "/", "_"
          ),
      )
      with open(img_path, "wb") as fd:
          fd.write(image_data)
  
      return img_path
  
file_path: dvc/dvc/render/converter/image.py
imports: import base64
  import os
  from typing import TYPE_CHECKING, Any, Dict, List, Tuple
  from dvc.render import FILENAME, REVISION, SRC
  from .None import Converter
label_desc: Use image node_id 1 for calling the ImageConverter obj's underlying member method code with example usage: obj._write_image(path, revision, filename, image_data) and returns: img_path