def iter_over_pairs(pairs):
 if isinstance(pairs, dict):
  return iteritems(pairs)
 else:
  return pairs

def iter_over_pairs ( pairs ) : if isinstance ( pairs , dict ) : return iteritems ( pairs ) else : return pairs
return an iterator over pairs present in the pairs input .