code: def test_from_json_with_field(tmpdir):
      json_path = json_data_with_field(tmpdir)
      dm = TranslationData.from_json(
          "input",
          "target",
          train_file=json_path,
          batch_size=1,
          field="data",
      )
      batch = next(iter(dm.train_dataloader()))
      assert isinstance(batch[DataKeys.INPUT][0], str)
      assert isinstance(batch[DataKeys.TARGET][0], str)
  
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 7 for calling a global function with example usage: test_from_json_with_field(tmpdir) without return types