def METHOD_NAME(key, value):
    if hasattr(self, key):
        attr = getattr(self, key)
        if isinstance(attr, gr.inputs.Input):
            attr.set(value)
        elif hasattr(attr, '__dict__'):
            for k, v in value.items():
                METHOD_NAME(k, v)
        else:
            setattr(self, key, value)
    else:
        print(f"Warning: {key} not found in the object's attributes.")