code: def build_upload_data(
      fname=os.path.join(
          os.path.dirname(__file__), "..", "data/test_df.csv"
      )
  ):
      with open(fname, "r") as f:
          data = f.read()
      return BytesIO(str.encode(data))
  
file_path: dtale/tests/dtale/test_upload.py
imports: import os
  import mock
  import pandas
  import pytest
  from six import BytesIO, PY3
  from dtale.app import build_app
  from dtale.pandas_util import check_pandas_version
  from tests import ExitStack
  from tests.dtale import build_data_inst
label_desc: Use image node_id 1 for calling a global function with example usage: build_upload_data(fname) and returns: BytesIO