code: def get_dynamodb_type(self, val):
          
          dynamodb_type = None
          if is_num(val):
              dynamodb_type = 'N'
          elif is_str(val):
              dynamodb_type = 'S'
          elif isinstance(val, (set, frozenset)):
              if False not in map(is_num, val):
                  dynamodb_type = 'NS'
              elif False not in map(is_str, val):
                  dynamodb_type = 'SS'
          if dynamodb_type is None:
              raise TypeError('Unsupported type "%s" for value "%s"' % (type(val), val))
          return dynamodb_type
docs: Take a scalar Python value and return a string representing
          the corresponding Amazon DynamoDB type.  If the value passed in is
          not a supported type, raise a TypeError.