def assign_otu_membership(biomfile):
samples = defaultdict(set)<EOL>_ = biomfile.pa()<EOL>for sid in biomfile.ids():<EOL><INDENT>for otuid in biomfile.ids("<STR_LIT>"):<EOL><INDENT>if biomfile.get_value_by_ids(otuid, sid) == <NUM_LIT:1>:<EOL><INDENT>samples[sid].add(otuid)<EOL><DEDENT><DEDENT><DEDENT>return samples<EOL>
Determines the OTUIDs present in each sample.
:type biomfile: biom.table.Table
:param biomfile: BIOM table object from the biom-format library.
:rtype: dict
:return: Returns a dictionary keyed on Sample ID with sets containing
the IDs of OTUIDs found in each sample.