def reverse_opt_map(opt_map):
 revdict = {}
 for (key, value) in list(opt_map.items()):
  if is_container(value):
   value = value[0]
  if ((key != u'flags') and (value is not None)):
   revdict[value.split()[0]] = key
 return revdict

def reverse_opt_map ( opt_map ) : revdict = { } for ( key , value ) in list ( opt_map . items ( ) ) : if is_container ( value ) : value = value [ 0 ] if ( ( key != u'flags' ) and ( value is not None ) ) : revdict [ value . split ( ) [ 0 ] ] = key return revdict
reverse the key/value pairs of the option map in the interface classes .