code: def dynamize_value(self, val):
          
          def _str(val):
              """
              DynamoDB stores booleans as numbers. True is 1, False is 0.
              This function converts Python booleans into DynamoDB friendly
              representation.
              """
              if isinstance(val, bool):
                  return str(int(val))
              return str(val)
  
          dynamodb_type = self.get_dynamodb_type(val)
          if dynamodb_type == 'N':
              val = {dynamodb_type : _str(val)}
          elif dynamodb_type == 'S':
              val = {dynamodb_type : val}
          elif dynamodb_type == 'NS':
              val = {dynamodb_type : [ str(n) for n in val]}
          elif dynamodb_type == 'SS':
              val = {dynamodb_type : [ n for n in val]}
          return val
docs: Take a scalar Python value and return a dict consisting
          of the Amazon DynamoDB type specification and the value that
          needs to be sent to Amazon DynamoDB.  If the type of the value
          is not supported, raise a TypeError