code: def dynamize_scan_filter(self, scan_filter):
          
          d = None
          if scan_filter:
              d = {}
              for attr_name, op, value in scan_filter:
                  if op == 'BETWEEN':
                      if isinstance(value, tuple):
                          avl = [self.dynamize_value(v) for v in value]
                      else:
                          msg = 'BETWEEN condition requires a tuple value'
                          raise TypeError(msg)
                  elif op == 'NULL' or op == 'NOT_NULL':
                      avl = None
                  elif isinstance(value, tuple):
                      msg = 'Tuple can only be supplied with BETWEEN condition'
                      raise TypeError(msg)
                  else:
                      avl = [self.dynamize_value(value)]
              dd = {'ComparisonOperator': op}
              if avl:
                  dd['AttributeValueList'] = avl
              d[attr_name] = dd
          return d
docs: Convert a layer2 scan_filter parameter into the
          structure required by Layer1.