code: def _bad_input(
      sentence_id: SentenceId, reason: str = ""
  ) -> BadTranslatorInput:
      logger.warning(
          "Bad input (%s): '%s'. Will return empty output.",
          sentence_id,
          reason.strip(),
      )
      return BadTranslatorInput(sentence_id=sentence_id, tokens=[])
  
imports: import copy
  import itertools
  import json
  import logging
  from dataclasses import dataclass
  from functools import partial
  from typing import Any, Callable, Dict, Generator, List, Optional, Set, Tuple, Union
  import numpy
  import torch
  from .None import constants
  from .None import lexicon
  from .None import utils
  from .None import vocab
  from .beam_search import CandidateScorer, get_search_algorithm, GreedySearch, SearchResult
  from .data_io import tokens2ids, get_prepended_token_length
  from .model import SockeyeModel
label_desc: Use image node_id 3 for calling a global function with example usage: _bad_input(sentence_id, reason) and returns: BadTranslatorInput