code: def test_file_info_to_json():
      file_infos = [
          FileInfo("/my/file", False, 123),
          FileInfo("/my/dir", True, None),
      ]
      info_str = _file_infos_to_json(file_infos)
      assert json.loads(info_str) == [
          {"path": "/my/file", "is_dir": False, "file_size": 123},
          {"path": "/my/dir", "is_dir": True},
      ]
  
file_path: mlflow/tests/store/artifact/test_cli.py
imports: import json
  import pathlib
  from unittest import mock
  import pytest
  from click.testing import CliRunner
  import mlflow
  import mlflow.pyfunc
  from mlflow.entities import FileInfo
  from mlflow.store.artifact.cli import _file_infos_to_json, download_artifacts
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
label_desc: Use image node_id 2 for calling a global function with example usage: test_file_info_to_json() without return types