def get_message(count, name, deleted=True):
    """Generates a message on the number of records inserted or deleted

    Args:
        count (int): The number of records
        name (str): The table name
        deleted (bool): The exception handler to wrap the function in
            (default: True)

    Examples:
        >>> print(get_message(5, 'table'))
        Deleted 5 records from table `table`.
        >>> print(get_message(5, 'table', False))
        Inserted 5 records into table `table`.

    Returns
        str: The message
    """
    verb, prep = ('Deleted', 'from') if deleted else ('Inserted', 'into')
    return '%s %s records %s table `%s`.' % (verb, count, prep, name)