code: func ListAccessor(obj interface{}) (List, error) {
  	switch t := obj.(type) {
  	case List:
  		return t, nil
  	case metav1.ListInterface:
  		return t, nil
  	case ListMetaAccessor:
  		if m := t.GetListMeta(); m != nil {
  			return m, nil
  		}
  		return nil, errNotList
  	case metav1.ListMetaAccessor:
  		if m := t.GetListMeta(); m != nil {
  			return m, nil
  		}
  		return nil, errNotList
  	default:
  		return nil, errNotList
  	}
  }
docs: // ListAccessor returns a List interface for the provided object or an error if the object does
  // not provide List.
  // IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an
  // object *is* a List.