code: def test_failed_make_input_from_valid_dict(
      text, text_key, factors, factors_key
  ):
      sentence_id = 1
      translator = mock_translator()
      inp = sockeye.inference.make_input_from_dict(
          sentence_id,
          {text_key: text, factors_key: factors},
          translator,
      )
      assert isinstance(inp, sockeye.inference.BadTranslatorInput)
  
imports: import itertools
  import json
  from math import ceil
  from unittest.mock import patch, Mock
  import numpy
  import pytest
  import torch
  import sockeye.beam_search
  import sockeye.constants
  import sockeye.data_io
  import sockeye.inference
  import sockeye.lexicon
  import sockeye.model
  import sockeye.utils
label_desc: Use image node_id 13 for calling a global function with example usage: test_failed_make_input_from_valid_dict(text, text_key, factors, factors_key) without return types