docstr: Convert the DVC Plots content to DVC Render datapoints.
  Return both generated datapoints and updated properties.
docstr_tok: ["Convert","the","DVC","Plots","content","to","DVC","Render","datapoints",".","Return","both","generated","datapoints","and","updated","properties","."]
code: def flat_datapoints(self, revision: str) -> Tuple[List[Dict], Dict]:
      """
      Convert the DVC Plots content to DVC Render datapoints.
      Return both generated datapoints and updated properties.
      """
      path = self.properties.get("out")
      datapoints = []
      datas, properties = self.convert()
      for filename, _, image_data in datas:
          if path:
              if not os.path.isdir(path):
                  os.makedirs(path, exist_ok=True)
              src = self._write_image(
                  os.path.abspath(path), revision, filename, image_data
              )
          else:
              src = self._encode_image(image_data)
          datapoint = {
              REVISION: revision,
              FILENAME: filename,
              SRC: src,
          }
          datapoints.append(datapoint)
      return datapoints, properties
  
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 4 for calling the ImageConverter obj's underlying member method code with example usage: obj.flat_datapoints(revision) and returns: datapoints,  properties