def _find_match(ele, lst):
 for _ele in lst:
  for match_key in _MATCH_KEYS:
   if (_ele.get(match_key) == ele.get(match_key)):
    return _ele

def _find_match ( ele , lst ) : for _ele in lst : for match_key in _MATCH_KEYS : if ( _ele . get ( match_key ) == ele . get ( match_key ) ) : return _ele
find a matching element in a list .