def __filter_items(items, name_filter, before_str):
 result = []
 for item in items:
  if (not name_filter.match(item.get('name'))):
   continue
  if ((before_str is None) or (determine_timestamp(item) < before_str)):
   result.append(item)
 return result

def __filter_items ( items , name_filter , before_str ) : result = [ ] for item in items : if ( not name_filter . match ( item . get ( 'name' ) ) ) : continue if ( ( before_str is None ) or ( determine_timestamp ( item ) < before_str ) ) : result . append ( item ) return result
args: items: [list of dict] list of item candidates .