Python 3.9 is now generally available.

google.appengine.api.datastore_types.SetNamespace

Sets the namespace for a protocol buffer or clears the field.

proto An entity_pb2.Reference to update
namespace The new namespace. None or an empty string will clear out the field.