parlai/core/worlds.py
def override_opts_in_shared(table, overrides):
    """Looks recursively for ``opt`` dictionaries within shared dict and overrides
    any key-value pairs with pairs from the overrides dict.
    """
    if 'opt' in table:
        # change values if an 'opt' dict is available
        for k, v in overrides.items():
            table['opt'][k] = v
    for k, v in table.items():
        # look for sub-dictionaries which also might contain an 'opt' dict
        if type(v) == dict and k != 'opt':
            override_opts_in_shared(v, overrides)
        elif type(v) == list:
            for item in v[:1]:  # don't actually want to iterate over all items
                if type(item) == dict:
                    override_opts_in_shared(item, overrides)
    return table
Looks recursively for ``opt`` dictionaries within shared dict and overrides
    any key-value pairs with pairs from the overrides dict.
    
Looks recursively for ``opt`` dictionaries within shared dict and overrides
any key-value pairs with pairs from the overrides dict.
Looks recursively for ` ` opt ` ` dictionaries within shared dict and overrides any key - value pairs with pairs from the overrides dict .
def override_opts_in_shared(table, overrides):
    if 'opt' in table:
        for k, v in overrides.items():
            table['opt'][k] = v
    for k, v in table.items():
        if type(v) == dict and k != 'opt':
            override_opts_in_shared(v, overrides)
        elif type(v) == list:
            for item in v[:1]:  
                if type(item) == dict:
                    override_opts_in_shared(item, overrides)
    return table
def override_opts_in_shared ( table , overrides ) : if 'opt' in table : for k , v in overrides . items ( ) : table [ 'opt' ] [ k ] = v for k , v in table . items ( ) : if type ( v ) == dict and k != 'opt' : override_opts_in_shared ( v , overrides ) elif type ( v ) == list : for item in v [ : 1 ] : if type ( item ) == dict : override_opts_in_shared ( item , overrides ) return table
Looks recursively for ``opt`` dictionaries within shared dict and overrides
any key-value pairs with pairs from the overrides dict.
Looks recursively for ` ` opt ` ` dictionaries within shared dict and overrides any key - value pairs with pairs from the overrides dict .
"""Looks recursively for ``opt`` dictionaries within shared dict and overrides
    any key-value pairs with pairs from the overrides dict.
    """ # change values if an 'opt' dict is available # look for sub-dictionaries which also might contain an 'opt' dict # don't actually want to iterate over all items
table
overrides