code: def test_inject_contexts_at_different_levels():
      c1 = {
          "messages": {"msg_var": 0},
          "plans": {"plans_var": 24},
          **config,
      }
      c2 = {"messages": {"level": 1}, **config}
  
      with TradingContext(c1):
          name = "TensorTrade"
          value = "the time and effort."
          instance1 = WorthMessageComponent(name=name, value=value)
          win1 = WinPlanComponent()
          lose1 = LosePlanComponent()
          assert hasattr(instance1.context, "msg_var")
          assert hasattr(win1.context, "plans_var")
          assert hasattr(lose1.context, "plans_var")
  
          with TradingContext(c2):
              name = "TensorTrade"
              value = "the time and effort."
              instance2 = WorthMessageComponent(name=name, value=value)
  
              assert hasattr(instance2.context, "level")
              assert instance2.context == {"level": 1, **config}
  
imports: from abc import abstractmethod
  from tensortrade.core import Component, TradingContext
label_desc: Use image node_id 6 for calling a global function with example usage: test_inject_contexts_at_different_levels() without return types