code: def update_item(self, tablename, key, updates, returns=NONE,
                      return_capacity=None, expect_or=False, **kwargs):
          key = self.dynamizer.encode_keys(key)
          attr_updates = {}
          expected = {}
          keywords = {
              'ReturnConsumedCapacity': self._default_capacity(return_capacity),
          }
          for update in updates:
              attr_updates.update(update.attrs(self.dynamizer))
              expected.update(update.expected(self.dynamizer))
          for k, v in six.iteritems(encode_query_kwargs(self.dynamizer, kwargs)):
              if k in expected:
                  raise ValueError("Cannot have more than one condition on a single field")
              expected[k] = v
          if expected:
              keywords['Expected'] = expected
              if len(expected) > 1:
                  keywords['ConditionalOperator'] = 'OR' if expect_or else 'AND'
          result = self.call('update_item', TableName=tablename, Key=key,
                             AttributeUpdates=attr_updates,
                             ReturnValues=returns,
                             **keywords)
          if result:
              return Result(self.dynamizer, result, 'Attributes')