code: def test_train_eval(mode, backend_fw):
      with ivy.utils.backend.ContextManager(backend_fw):
          cls = ModuleWithTrainEval()
          cls.train(mode)
          assert mode == cls.training
          cls.eval()
          assert not cls.training
  
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 10 for calling a global function with example usage: test_train_eval(mode, backend_fw) without return types