code: def setup_data(tmp_path_factory):
      # setup location for training data
      data_dir = tmp_path_factory.mktemp("data", numbered=False)
      train_fp = os.path.join(data_dir, "train.csv")
  
      # setup local cache to torchvision model to avoid multiple downloads
      tv_cache = tmp_path_factory.mktemp("tv_cache", numbered=False)
  
      # describe synthetic data to create
      feature_list = [
          {"name": "binary_output_feature", "type": "binary"},
          {
              "name": "image",
              "type": "image",
              "destination_folder": os.path.join(data_dir, "images"),
              "preprocessing": {
                  "height": 600,
                  "width": 600,
                  "num_channels": 3,
              },
          },
      ]
  
      # create synthetic data
      cli_synthesize_dataset(10, feature_list, train_fp)
  
      return train_fp, str(tv_cache)
  
file_path: ludwig/tests/ludwig/models/test_trainable_image_layers.py
imports: import logging
  import os
  import pytest
  import torch
  from torchvision.models import resnet18, ResNet18_Weights
  from ludwig.api import LudwigModel
  from ludwig.data.dataset_synthesizer import cli_synthesize_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: setup_data(tmp_path_factory) and returns: train_fp,  str