docstr: Helper method to assign item to a given dictionary.
  
  Uses `_types` to type-check the value, before assigning.
code: def _set_(self, dct, key, value):
      """
      Helper method to assign item to a given dictionary.
  
      Uses `_types` to type-check the value, before assigning.
      """
  
      assert key not in self._dependencies, "Can't override dependency."
  
      # If we have type-information, we apply the pydantic-model to the value
      model = self._types.get(key)
      if model is not None:
          # If `settings.foo` is a pydantic model, we want to allow partial
          # assignment: `settings.foo = {"b": 1}` should only set `b`
          # Thus we check whether we are dealing with a pydantic model and if
          # we are also assigning a `dict`:
          type_ = model.__fields__[key].type_
  
          if issubclass(type_, pydantic.BaseModel) and isinstance(
              value, dict
          ):
              value = type_.parse_obj(
                  deep_update(self[key].dict(), value)
              )
          else:
              value = getattr(model.parse_obj({key: value}), key)
  
      dct[key] = value
  
imports: import functools
  import inspect
  import itertools
  from operator import attrgetter
  from typing import Any
  from gluonts.pydantic import pydantic, deep_update
label_desc: Use image node_id 11 for calling the Settings obj's underlying member method code with example usage: obj._set_(dct, key, value) without return types