code: def test_inject():
      @settings._inject("a")
      def x(a, b):
          return a, b
  
      with settings._let(a=42):
          assert x(b=0) == (42, 0)
          assert x(1, 2) == (1, 2)
  
      @settings._inject("b")
      def x(a, b):
          return a, b
  
      with settings._let(b=42):
          assert x(0) == (0, 42)
          assert x(1, 2) == (1, 2)
  
      @settings._inject("a")
      def x(a=1):
          return a
  
      assert x() == 1
  
      @settings._inject(a="args.a", b="args.b")
      def x(a, b):
          return a, b
  
      assert x() == (1, 2)
  
      with settings._let(args={"a": 4, "b": 5}):
          assert x() == (4, 5)
  
file_path: gluonts/test/core/test_settings.py
imports: from gluonts.core.settings import Settings, let
  from gluonts.pydantic import BaseModel
label_desc: Use image node_id 5 for calling a global function with example usage: test_inject() and returns: a,  b, a,  b, a, a,  b