def contains(self, key, value, element=None) -> bool:
        """Checks recursively whether the URDF tree contains the provided key-value pair.

        Args:
            key (str): A key.
            value (str): A value.
            element (etree.Element, optional): The XML element from which to start the recursive search. None means URDF root. Defaults to None.

        Returns:
            bool: Whether the key-value pair was found.
        """
        if element is None:
            element = self.robot

        result = False
        for field in element.__dataclass_fields__:
            field_value = getattr(element, field)
            if is_dataclass(field_value):
                result = result or self.contains(key=key, value=value, element=field_value)
            elif isinstance(field_value, list) and len(field_value) > 0 and is_dataclass(field_value[0]):
                for field_value_element in field_value:
                    result = result or self.contains(key=key, value=value, element=field_value_element)
            else:
                if key == field and value == field_value:
                    result = True
        return result
Checks recursively whether the URDF tree contains the provided key-value pair.

        Args:
            key (str): A key.
            value (str): A value.
            element (etree.Element, optional): The XML element from which to start the recursive search. None means URDF root. Defaults to None.

        Returns:
            bool: Whether the key-value pair was found.
        
deploy/teleop/robot_control/dex_retargeting/yourdfpy.py