code: func (d *namespacedResourcesDeleter) finalizeNamespace(namespace *v1.Namespace) (*v1.Namespace, error) {
  	namespaceFinalize := v1.Namespace{}
  	namespaceFinalize.ObjectMeta = namespace.ObjectMeta
  	namespaceFinalize.Spec = namespace.Spec
  	finalizerSet := sets.NewString()
  	for i := range namespace.Spec.Finalizers {
  		if namespace.Spec.Finalizers[i] != d.finalizerToken {
  			finalizerSet.Insert(string(namespace.Spec.Finalizers[i]))
  		}
  	}
  	namespaceFinalize.Spec.Finalizers = make([]v1.FinalizerName, 0, len(finalizerSet))
  	for _, value := range finalizerSet.List() {
  		namespaceFinalize.Spec.Finalizers = append(namespaceFinalize.Spec.Finalizers, v1.FinalizerName(value))
  	}
  	namespace, err := d.nsClient.Finalize(&namespaceFinalize)
  	if err != nil {
  		// it was removed already, so life is good
  		if errors.IsNotFound(err) {
  			return namespace, nil
  		}
  	}
  	return namespace, err
  }
docs: // finalizeNamespace removes the specified finalizerToken and finalizes the namespace