code: def test_log_figure_plotly_image(extension):
      from plotly import graph_objects as go
  
      subdir = "."
      filename = f"figure.{extension}"
      artifact_file = posixpath.join(subdir, filename)
  
      fig = go.Figure(go.Scatter(x=[0, 1], y=[2, 3]))
  
      with mlflow.start_run():
          mlflow.log_figure(fig, artifact_file)
  
          artifact_path = (
              None if subdir is None else posixpath.normpath(subdir)
          )
          artifact_uri = mlflow.get_artifact_uri(artifact_path)
          run_artifact_dir = local_file_uri_to_path(artifact_uri)
          assert os.listdir(run_artifact_dir) == [filename]
  
file_path: mlflow/tests/tracking/test_log_figure.py
imports: import os
  import posixpath
  import uuid
  import pytest
  import mlflow
  from mlflow.utils.file_utils import local_file_uri_to_path
  from mlflow.utils.os import is_windows
label_desc: Use image node_id 3 for calling a global function with example usage: test_log_figure_plotly_image(extension) without return types