code: def test_module_w_partial_v(
      batch_shape,
      input_channels,
      output_channels,
      on_device,
      backend_fw,
  ):
      # smoke test
      if backend_fw == "numpy":
          # NumPy does not support gradients
          return
  
      with ivy.utils.backend.ContextManager(backend_fw):
          x = ivy.astype(
              ivy.linspace(
                  ivy.zeros(batch_shape),
                  ivy.ones(batch_shape),
                  input_channels,
              ),
              "float32",
          )
          v = ivy.Container(
              {
                  "linear0": {
                      "b": _variable(ivy.random_uniform(shape=[64])),
                      "w": _variable(ivy.random_uniform(shape=[64, 4])),
                  },
                  "linear1": {
                      "b": _variable(ivy.random_uniform(shape=[64])),
                      "w": _variable(
                          ivy.random_uniform(shape=[64, 64])
                      ),
                      "extra": _variable(
                          ivy.random_uniform(shape=[64, 64])
                      ),
                  },
                  "linear2": {
                      "b": _variable(ivy.random_uniform(shape=[5])),
                      "w": _variable(ivy.random_uniform(shape=[5, 64])),
                  },
              }
          )
          try:
              TrainableModule(
                  input_channels,
                  output_channels,
                  device=on_device,
                  v=v,
                  with_partial_v=True,
              )
              raise Exception(
                  "TrainableModule did not raise exception despite being passed "
                  "with wrongly shaped variables."
              )
          except ivy.utils.exceptions.IvyException:
              pass
          v = ivy.Container(
              {
                  "linear0": {
                      "b": _variable(ivy.random_uniform(shape=[64])),
                  },
                  "linear1": {
                      "w": _variable(ivy.random_uniform(shape=[64, 64]))
                  },
                  "linear2": {
                      "b": _variable(
                          ivy.random_uniform(shape=[output_channels])
                      )
                  },
              }
          )
          try:
              TrainableModule(
                  input_channels, output_channels, device=on_device, v=v
              )
              raise Exception(
                  "TrainableModule did not raise exception despite being passed "
                  "with wrongly shaped variables."
              )
          except ivy.utils.exceptions.IvyException:
              pass
          module = TrainableModule(
              input_channels,
              output_channels,
              device=on_device,
              v=v,
              with_partial_v=True,
          )
          module(x)
  
imports: import os
  from hypothesis import given, strategies
  import numpy
  import ivy
  from ivy.functional.ivy.gradients import _variable
  import ivy_tests.test_ivy.helpers
label_desc: Use image node_id 9 for calling a global function with example usage: test_module_w_partial_v(batch_shape, input_channels, output_channels, on_device, backend_fw) without return types