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.