def WritingBloomFilter(num_elements, max_fp_prob, filename=None,<EOL>ignore_case=False, want_lock=False,<EOL>fdatasync_on_close=True):
new_filter = _hydra.BloomFilter.getFilter(<EOL>num_elements, max_fp_prob,<EOL>filename=filename, ignore_case=ignore_case,<EOL>read_only=False, want_lock=want_lock,<EOL>fdatasync_on_close=fdatasync_on_close)<EOL>if filename:<EOL><INDENT>with open('<STR_LIT>'.format(filename), '<STR_LIT:w>') as descriptor:<EOL><INDENT>descriptor.write("<STR_LIT>".format(num_elements))<EOL>descriptor.write("<STR_LIT>".format(max_fp_prob))<EOL>descriptor.write("<STR_LIT>".format(ignore_case))<EOL><DEDENT><DEDENT>return new_filter<EOL>
Create a read/write bloom filter with an upperbound of
(num_elements, max_fp_prob) as a specification and using filename
as the backing datastore.