human
Write me a the Python program you requested given the following:
Complete the below
def get_doctypes_with_web_view():

    ''''Return doctypes with Has Web View or set via hooks'
    '''
assistant
#Here is the Python program you requested.
    def _get():
        installed_apps = frappe.get_installed_apps()
        doctypes = frappe.get_hooks(u'website_generators')
        doctypes += [d.name for d in frappe.get_all(u'DocType', u'name,    module', dict(has_web_view=1)) if (frappe.local.module_app[frappe.scrub(d.module)] in installed_apps)]
        return doctypes
    return frappe.cache().get_value(u'doctypes_with_web_view', _get)