def calc_support(self, items):
<EOL>if not items:<EOL><INDENT>return <NUM_LIT:1.0><EOL><DEDENT>if not self.num_transaction:<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT>sum_indexes = None<EOL>for item in items:<EOL><INDENT>indexes = self.__transaction_index_map.get(item)<EOL>if indexes is None:<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT>if sum_indexes is None:<EOL><INDENT>sum_indexes = indexes<EOL><DEDENT>else:<EOL><INDENT>sum_indexes = sum_indexes.intersection(indexes)<EOL><DEDENT><DEDENT>return float(len(sum_indexes)) / self.__num_transaction<EOL>
Returns a support for items.

Arguments:
    items -- Items as an iterable object (eg. ['A', 'B']).