code: def is_mandatory(self):
      return self.default_value == _empty
  
file_path: haystack/haystack/core/component/sockets.py
imports: from typing import get_args, List, Type, Any
  import logging
  from dataclasses import dataclass, field
  from haystack.core.component.types import CANALS_VARIADIC_ANNOTATION
label_desc: Use image node_id 1 for calling the InputSocket obj's underlying member method code with example usage: obj.is_mandatory() and returns: unknown