def process_get_tags_by_filter(http_resp, tags, yield_text, processes, hash_string, debug):
 pid = multiprocessing.current_process().pid
 processes[hash_string] = pid
 document_parser = DocumentParser(http_resp)
 if (not hasattr(document_parser, 'get_tags_by_filter')):
  return []
 filtered_tags = []
 for tag in document_parser.get_tags_by_filter(tags, yield_text=yield_text):
  filtered_tags.append(tag)
 return filtered_tags

def process_get_tags_by_filter ( http_resp , tags , yield_text , processes , hash_string , debug ) : pid = multiprocessing . current_process ( ) . pid processes [ hash_string ] = pid document_parser = DocumentParser ( http_resp ) if ( not hasattr ( document_parser , 'get_tags_by_filter' ) ) : return [ ] filtered_tags = [ ] for tag in document_parser . get_tags_by_filter ( tags , yield_text = yield_text ) : filtered_tags . append ( tag ) return filtered_tags
simple wrapper to get the current process id and store it in a shared object so we can kill the process if needed .