def dict_to_sequence(d):
 if hasattr(d, 'items'):
  d = d.items()
 return d

def dict_to_sequence ( d ) : if hasattr ( d , 'items' ) : d = d . items ( ) return d
returns an internal sequence dictionary update .