def normalize_actions(actions):
 result = []
 for v in actions:
  if (not isinstance(v, dict)):
   v = expand_action_tuple(*v)
  result.append(v)
 return result

def normalize_actions ( actions ) : result = [ ] for v in actions : if ( not isinstance ( v , dict ) ) : v = expand_action_tuple ( * v ) result . append ( v ) return result
convert old-style tuple actions to new-style dicts .