Return protobuf class types from an imported generated module.

def types_from_module(pb_module):
    '''
    Return protobuf class types from an imported generated module.
    '''
    types = pb_module.DESCRIPTOR.message_types_by_name
    return [getattr(pb_module, name) for name in types]