code: def test_sequential_construction_and_value(
      input_array, dims, use_activation, on_device, backend_fw
  ):
      with ivy.utils.backend.ContextManager(backend_fw):
          dims = [len(input_array)] + dims
          layer_count = len(dims)
          layers = [
              ivy.Linear(dims[i], dims[i + 1], device=on_device)
              for i in range(layer_count - 1)
          ]
  
          if use_activation:
              activations = [ivy.GELU() for _ in range(layer_count - 1)]
              layers = itertools.chain.from_iterable(
                  zip(layers, activations)
              )
  
          module = ivy.Sequential(*layers)
  
          input_array = ivy.array(
              input_array, dtype="float32", device=on_device
          )
  
          if backend_fw != "numpy":
              _train(module, input_array)
  
file_path: ivy/ivy_tests/test_ivy/test_stateful/test_sequential.py
imports: import itertools
  from hypothesis import strategies
  import ivy
  from ivy_tests.test_ivy import helpers
  from ivy_tests.test_ivy.helpers.testing_helpers import handle_method
label_desc: Use image node_id 3 for calling a global function with example usage: test_sequential_construction_and_value(input_array, dims, use_activation, on_device, backend_fw) without return types