class_docstr: Transaction managers.
class_docstr_tok: ["Transaction","managers","."]
docstr: Returns a support for items.
  
  Arguments:
      items -- Items as an iterable object (eg. ['A', 'B']).
docstr_tok: ["Returns","a","support","for","items",".","Arguments",":","items","--","Items","as","an","iterable","object","(","eg",".","[","'","A","'",",","'","B","'","]",")","."]
code: def calc_support(self, items):
      """
      Returns a support for items.
  
      Arguments:
          items -- Items as an iterable object (eg. ['A', 'B']).
      """
      # Empty items is supported by all transactions.
      if not items:
          return 1.0
  
      # Empty transactions supports no items.
      if not self.num_transaction:
          return 0.0
  
      # Create the transaction index intersection.
      sum_indexes = None
      for item in items:
          indexes = self.__transaction_index_map.get(item)
          if indexes is None:
              # No support for any set that contains a not existing item.
              return 0.0
  
          if sum_indexes is None:
              # Assign the indexes on the first time.
              sum_indexes = indexes
          else:
              # Calculate the intersection on not the first time.
              sum_indexes = sum_indexes.intersection(indexes)
  
      # Calculate and return the support.
      return float(len(sum_indexes)) / self.__num_transaction
  
imports: import sys
  import csv
  import argparse
  import json
  import os
  from collections import namedtuple
  from itertools import combinations
  from itertools import chain
label_desc: Use image node_id 3 for calling the TransactionManager obj's underlying member method code with example usage: obj.calc_support(items) and returns: unknown, int, int, int