code: def register_validation(getattr_function):
      @wraps(getattr_function)
      def validate_attribute(self, name):
          # Get dispatched function call
          function = getattr_function(self, name)
  
          if not cfg.safety.mpc.debug.validation_mode:
              return function
  
          # Run validation
          return validate_correctness(self, function, name)
  
      return validate_attribute
  
label_desc: Use image node_id 1 for calling a global function with example usage: register_validation(getattr_function) and returns: validate_attribute, validate_correctness, function