code: def _unionload(l: Loader, value, type_) -> Any:
      
      try:
          args = uniontypes(type_)
      except AttributeError:
          raise TypedloadAttributeError('The typing API for this Python version is unknown')
  
      # Do not convert basic types, if possible
      if type(value) in args.intersection(l.basictypes):
          return value
  
      exceptions = []
  
      # Try all types
      for t in args:
          try:
              return l.load(value, t, annotation=Annotation(AnnotationType.UNION, t))
          except Exception as e:
              exceptions.append(e)
      raise TypedloadValueError(
          'Value could not be loaded into %s' % type_,
              value=value,
              type_=type_,
              exceptions=exceptions
      )
docs: Loads a value into a union.
  
      Basically this iterates all the types inside the
      union, until one that doesn't raise an exception
      is found.
  
      If no suitable type is found, an exception is raised.