def perform_setup(data):
    """Prepare and reference test data.

    This is done here by:

    - loading and referencing input data
    - copying contents of a .ndz file in a temporary location
    """

    ### load and reference input data

    with ZipFile(
        str(SYSTEM_TESTING_DATA_DIR / 'test_cases' / 'stc0005.zip'),
        mode='r',
    ) as archive:

        with archive.open('input_data.pyl', mode='r') as input_data_file:

            data.input_data = (
                literal_eval(input_data_file.read().decode(encoding='utf-8'))
            )

    ### load contents of a .ndz file

    with ZipFile(
        str(SYSTEM_TESTING_DATA_DIR / 'shared' / 'file_with_objects.zip'),
        mode='r',
    ) as archive:

        with archive.open('file_with_objects.ndz', mode='r') as file_to_load:
            ndz_text = file_to_load.read().decode(encoding='utf-8')

    ### save the contents in a temporary file and reference it

    temporary_filepath = Path(mkstemp(suffix='.ndz', text=True)[1])

    temporary_filepath.write_text(ndz_text, encoding='utf-8')

    data.filepath = temporary_filepath

    ### store the path to the temporary file so we can remove it after the
    ### test finishes
    TEMP_FILEPATH.append(temporary_filepath)
Prepare and reference test data.

    This is done here by:

    - loading and referencing input data
    - copying contents of a .ndz file in a temporary location
    
nodezator/systemtesting/testcases/stc0005.py