def elements_pack(elements, null_sequence=null_sequence, long_pack=
    long_pack, len=len):
    """
	Pack the elements for containment within a serialized array.

	This is used by array_pack.
	"""
    for x in elements:
        if x is None:
            yield null_sequence
        else:
            yield long_pack(len(x))
            yield x
