'Return whether an item (record) exists within a table in DynamoDB.
To specify the key of the item you\'d like to get, you can specify the
key attributes as kwargs.
Optionally accepts a ``consistent`` parameter, which should be a
boolean. If you provide ``True``, it will perform
a consistent (but more expensive) read from DynamoDB.
(Default: ``False``)
Optionally accepts an ``attributes`` parameter, which should be a
list of fieldnames to fetch. (Default: ``None``, which means all fields
should be fetched)
Returns ``True`` if an ``Item`` is present, ``False`` if not.
Example::
# Simple, just hash-key schema.
>>> users.has_item(username=\'johndoe\')
True
# Complex schema, item not present.
>>> users.has_item(
...     username=\'johndoe\',
...     date_joined=\'2014-01-07\'
False'

def has_item(self, **kwargs):

    try:
        self.get_item(**kwargs)
    except (JSONResponseError, exceptions.ItemNotFound):
        return False
    return True
