def _randcoll(pool, dt):
valid_types = [tuple, list, set, dict]<EOL>if dt not in valid_types:<EOL><INDENT>raise TypeError("<STR_LIT>".<EOL>format(str(dt), "<STR_LIT:U+002CU+0020>".join(str(t) for t in valid_types)))<EOL><DEDENT>rs = [random.choice(pool) for _ in range(random.randint(<NUM_LIT:1>, <NUM_LIT:10>))]<EOL>return dict(enumerate(rs)) if dt == dict else rs<EOL>
Generate random collection of 1-10 elements.

:param Iterable pool: elements from which to choose
:param type dt: type of collection to create
:return Iterable[object]: collection of randomly generated elements