code: def prep_global_datadir(tmp_path_factory, original_global_datadir):
      temp_dir = tmp_path_factory.mktemp("data") / "datadir"
      shutil.copytree(original_global_datadir, temp_dir)
      return temp_dir
  
file_path: lightning-flash/tests/conftest.py
imports: import os
  import pathlib
  import shutil
  import pytest
  import torch
  from flash.core.serve.decorators import uuid4
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE, _TORCHVISION_AVAILABLE
  from pytest_mock import MockerFixture
label_desc: Use image node_id 3 for calling a global function with example usage: prep_global_datadir(tmp_path_factory, original_global_datadir) and returns: temp_dir