Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.

google.appengine.api.datastore.NormalizeAndTypeCheck

Normalizes and type checks the given argument.

arg an instance or iterable of the given type(s)
types allowed type or tuple of types

A (list, bool) tuple. The list is a normalized, shallow copy of the argument. The boolean is True if the argument was a sequence, False if it was a single object.

AssertionError types includes list or tuple.
BadArgumentError arg is not an instance or sequence of one of the given types.