def generic_element(title, subtitle=None, image_url=None, buttons=None):
    """
    Creates a dict to use with send_generic
    :param title: Content for receiver title
    :param subtitle: Content for receiver subtitle (optional)
    :param image_url: Content for receiver image to show by url (optional)
    :param button: Content for receiver button shown (optional)
    :return: dict
    """
    element = {
        "title": title,
        "subtitle": subtitle,
        "image_url": image_url,
        "buttons": buttons
    }

    if not subtitle:
        element.pop('subtitle')

    if not image_url:
        element.pop('image_url')

    if not buttons:
        element.pop('buttons')

    return element