class_docstr: Base class for Selection widgets
  
  ``options`` can be specified as a list of values or a list of (label, value)
  tuples. The labels are the strings that will be displayed in the UI,
  representing the actual Python choices, and should be unique.
  If labels are not specified, they are generated from the values.
  
  When programmatically setting the value, a reverse lookup is performed
  among the options to check that the value is valid. The reverse lookup uses
  the equality operator by default, but another predicate may be provided via
  the ``equals`` keyword argument. For example, when dealing with numpy arrays,
  one may set equals=np.array_equal.
class_docstr_tok: ["Base","class","for","Selection","widgets","``","options","``","can","be","specified","as","a","list","of","values","or","a","list","of","(","label",",","value",")","tuples",".","The","labels","are","the","strings","that","will","be","displayed","in","the","UI",",","representing","the","actual","Python","choices",",","and","should","be","unique",".","If","labels","are","not","specified",",","they","are","generated","from","the","values",".","When","programmatically","setting","the","value",",","a","reverse","lookup","is","performed","among","the","options","to","check","that","the","value","is","valid",".","The","reverse","lookup","uses","the","equality","operator","by","default",",","but","another","predicate","may","be","provided","via","the","``","equals","``","keyword","argument",".","For","example",",","when","dealing","with","numpy","arrays",",","one","may","set","equals=np.array_equal","."]
code: def _validate_value(self, proposal):
      value = proposal.value
      try:
          return (
              findvalue(self._options_values, value, self.equals)
              if value is not None
              else None
          )
      except ValueError:
          raise TraitError("Invalid selection: value not found")
  
imports: from collections.abc import Iterable, Mapping
  from itertools import chain
  from .widget_description import DescriptionWidget, DescriptionStyle
  from .valuewidget import ValueWidget
  from .widget_core import CoreWidget
  from .widget_style import Style
  from .trait_types import InstanceDict, TypedTuple
  from .widget import register, widget_serialization
  from .widget_int import SliderStyle
  from .docutils import doc_subst
  from traitlets import Unicode, Bool, Int, Any, Dict, TraitError, CaselessStrEnum, Tuple, Union, observe, validate
label_desc: Use image node_id 6 for calling the _Selection obj's underlying member method code with example usage: obj._validate_value(proposal) and returns: unknown