code: def _get_dis_func(self, union):
          # type: (Type) -> Callable[..., Type]
          
          union_types = union.__args__
          if NoneType in union_types:  # type: ignore
              # We support unions of attrs classes and NoneType higher in the
              # logic.
              union_types = tuple(
                  e for e in union_types if e is not NoneType  # type: ignore
              )
  
          if not all(hasattr(e, "__attrs_attrs__") for e in union_types):
              raise ValueError(
                  "Only unions of attr classes supported "
                  "currently. Register a loads hook manually."
              )
          return create_uniq_field_dis_func(*union_types)
docs: Fetch or try creating a disambiguation function for a union.