def validate_spin(value, _):
    """
    Validate spin_option input port.
    """
    if value:
        allowedspins = ["q", "s", "x", "y", "z"]
        if value.value not in allowedspins:
            return f"The allowed options for the port 'spin_option' are {allowedspins}."