def delete_item(self, table_name, hash_key, range_key=None, condition=None, expected=None, conditional_operator=None, return_values=None, return_consumed_capacity=None, return_item_collection_metrics=None):
    '\n        Performs the DeleteItem operation and returns the result\n        '
    self._check_condition('condition', condition, expected, conditional_operator)
    operation_kwargs = {TABLE_NAME: table_name}
    operation_kwargs.update(self.get_identifier_map(table_name, hash_key, range_key))
    name_placeholders = {}
    expression_attribute_values = {}
    if (condition is not None):
        condition_expression = condition.serialize(name_placeholders, expression_attribute_values)
        operation_kwargs[CONDITION_EXPRESSION] = condition_expression
    if return_values:
        operation_kwargs.update(self.get_return_values_map(return_values))
    if return_consumed_capacity:
        operation_kwargs.update(self.get_consumed_capacity_map(return_consumed_capacity))
    if return_item_collection_metrics:
        operation_kwargs.update(self.get_item_collection_map(return_item_collection_metrics))
    conditional_operator = self.get_conditional_operator((conditional_operator or AND))
    if expected:
        condition_expression = self._get_condition_expression(table_name, expected, conditional_operator, name_placeholders, expression_attribute_values)
        operation_kwargs[CONDITION_EXPRESSION] = condition_expression
    if name_placeholders:
        operation_kwargs[EXPRESSION_ATTRIBUTE_NAMES] = self._reverse_dict(name_placeholders)
    if expression_attribute_values:
        operation_kwargs[EXPRESSION_ATTRIBUTE_VALUES] = expression_attribute_values
    try:
        return self.dispatch(DELETE_ITEM, operation_kwargs)
    except BOTOCORE_EXCEPTIONS as e:
        raise DeleteError('Failed to delete item: {0}'.format(e), e)
Performs the DeleteItem operation and returns the result
def delete_item(self, table_name, hash_key, range_key=None, condition=None, expected=None, conditional_operator=None, return_values=None, return_consumed_capacity=None, return_item_collection_metrics=None):
    '\n        \n        '
    self._check_condition('condition', condition, expected, conditional_operator)
    operation_kwargs = {TABLE_NAME: table_name}
    operation_kwargs.update(self.get_identifier_map(table_name, hash_key, range_key))
    name_placeholders = {}
    expression_attribute_values = {}
    if (condition is not None):
        condition_expression = condition.serialize(name_placeholders, expression_attribute_values)
        operation_kwargs[CONDITION_EXPRESSION] = condition_expression
    if return_values:
        operation_kwargs.update(self.get_return_values_map(return_values))
    if return_consumed_capacity:
        operation_kwargs.update(self.get_consumed_capacity_map(return_consumed_capacity))
    if return_item_collection_metrics:
        operation_kwargs.update(self.get_item_collection_map(return_item_collection_metrics))
    conditional_operator = self.get_conditional_operator((conditional_operator or AND))
    if expected:
        condition_expression = self._get_condition_expression(table_name, expected, conditional_operator, name_placeholders, expression_attribute_values)
        operation_kwargs[CONDITION_EXPRESSION] = condition_expression
    if name_placeholders:
        operation_kwargs[EXPRESSION_ATTRIBUTE_NAMES] = self._reverse_dict(name_placeholders)
    if expression_attribute_values:
        operation_kwargs[EXPRESSION_ATTRIBUTE_VALUES] = expression_attribute_values
    try:
        return self.dispatch(DELETE_ITEM, operation_kwargs)
    except BOTOCORE_EXCEPTIONS as e:
        raise DeleteError('Failed to delete item: {0}'.format(e), e)