code: def test_to_single_stage_lockfile_cloud_versioning_dir(dvc):
      stage = create_stage(PipelineStage, dvc, outs=["dir"], **kwargs)
      stage.outs[0].hash_info = HashInfo("md5", "md-five.dir")
      files = [
          {
              "size": 3,
              "version_id": "WYRG4BglP7pD.gEoJP6a4AqOhl.FRA.h",
              "etag": "acbd18db4cc2f85cedef654fccc4a4d8",
              "md5": "acbd18db4cc2f85cedef654fccc4a4d8",
              "relpath": "bar",
          },
          {
              "size": 3,
              "version_id": "0vL53tFVY5vVAoJ4HG2jCS1mEcohDPE0",
              "etag": "acbd18db4cc2f85cedef654fccc4a4d8",
              "md5": "acbd18db4cc2f85cedef654fccc4a4d8",
              "relpath": "foo",
          },
      ]
      stage.outs[0].files = files
      e = _to_single_stage_lockfile(stage, with_files=True)
      assert Schema(e)
      assert e["outs"][0] == {
          "hash": "md5",
          "path": "dir",
          "files": files,
      }
  
imports: from collections import OrderedDict
  import pytest
  from voluptuous import Schema
  from dvc.dvcfile import PROJECT_FILE
  from dvc.schema import LOCK_FILE_STAGE_SCHEMA, LOCKFILE_STAGES_SCHEMA
  from dvc.stage import PipelineStage, create_stage
  from dvc.stage.serialize import DEFAULT_PARAMS_FILE, to_lockfile
  from dvc.stage.serialize import to_single_stage_lockfile
  from dvc.stage.utils import split_params_deps
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 15 for calling a global function with example usage: test_to_single_stage_lockfile_cloud_versioning_dir(dvc) without return types