code: def test_input_validation():
      with pytest.raises(
          RuntimeError, match="Use `IterableInput` instead."
      ):
  
          class InvalidInput(Input):
              def __init__(self, *args, **kwargs):
                  super().__init__(*args, **kwargs)
  
                  self.data = iter([1, 2, 3])
  
          InvalidInput(RunningStage.TRAINING)
  
      class ValidInput(Input):
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
  
              self.data = [1, 2, 3]
  
      ValidInput(RunningStage.TRAINING)
  
imports: import pytest
  from flash.core.data.io.input import Input, IterableInput, ServeInput
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
  from flash.core.utilities.stages import RunningStage
label_desc: Use image node_id 1 for calling a global function with example usage: test_input_validation() without return types