code: def json_data(tmpdir):
      path = Path(tmpdir) / "data.json"
      path.write_text(TEST_JSON_DATA)
      return path
  
file_path: lightning-flash/tests/text/seq2seq/translation/test_data.py
imports: import os
  from pathlib import Path
  import pytest
  from flash import DataKeys
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE
  from flash.text import TranslationData
label_desc: Use image node_id 2 for calling a global function with example usage: json_data(tmpdir) and returns: path