def METHOD_NAME(self, elements=None, **options) -> str:
    """
    Store the associated image as a png file and return
    a LaTeX command for including it.
    """
    data, size = self.boxes_to_png(elements, **options)
    res = 100  # pixels/cm
    width_str, height_str = (str(n / res).strip() for n in size)
    head = rf"\includegraphics[width={width_str}cm,height={height_str}cm]"
    # This produces a random name, where the png file is going to be stored.
    # LaTeX does not have a native way to store an figure embeded in
    # the source.
    fp = tempfile.NamedTemporaryFile(delete=True, suffix=".png")
    path = fp.name
    fp.close()
    with open(path, "wb") as imgfile:
        imgfile.write(data)
    return head + "{" + format(path) + "}"