code: def convert_to_batch_form(data_df):
      data = data_df.to_dict(orient="split")
      files = {
          "dataset": (None, json.dumps(data), "application/json"),
      }
      for row in data["data"]:
          for v in row:
              if (
                  type(v) == str
                  and os.path.exists(v)
                  and v not in files
              ):
                  files[v] = (
                      v,
                      open(v, "rb"),
                      "application/octet-stream",
                  )
      return files
  
file_path: ludwig/tests/integration_tests/test_server.py
imports: import json
  import logging
  import os
  import sys
  import numpy
  import pytest
  from ludwig.api import LudwigModel
  from ludwig.constants import BATCH_SIZE, DECODER, TRAINER
  from ludwig.serve import server
  from ludwig.utils.data_utils import read_csv
  from tests.integration_tests.utils import audio_feature, category_feature, generate_data, image_feature, LocalTestBackend, number_feature, text_feature
label_desc: Use image node_id 5 for calling a global function with example usage: convert_to_batch_form(data_df) and returns: files