code: def index(self, value: Any) -> int:
          
          for i, cond in ((j[0], j[1][0]) for j in enumerate(self.handlers)):
              try:
                  match = cond(value)
              except:
                  if self.raiseconditionerrors:
                      raise
                  match = False
              if match:
                  return i
          raise TypedloadValueError('Unable to dump %s' % value, value=value)
docs: Returns the index in the handlers list
          that matches the given value.
  
          If no condition matches, ValueError is raised.