def METHOD_NAME(random_class_weights):
    '''
    Generates a look-up dict for random class weights.
    '''
    lookup = dict()
    for remap_entry in random_class_weights:
        if not remap_entry['to']:
            continue
        from_classes = remap_entry['from']
        for from_class in from_classes:
            if from_class and from_class not in lookup:
                lookup[from_class] = remap_entry
    return lookup