<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def export_elements(self, filename='export_elements.zip', typeof='all'):
 """ Export elements from SMC. Valid types are: all (All Elements)|nw (Network Elements)|ips (IPS Elements)| sv (Services)|rb (Security Policies)|al (Alerts)| vpn (VPN Elements) :param type: type of element :param filename: Name of file for export :raises TaskRunFailed: failure during export with reason :rtype: DownloadTask """

        valid_types = ['all', 'nw', 'ips', 'sv', 'rb', 'al', 'vpn']
        if typeof not in valid_types:
            typeof = 'all'
        
        return Task.download(self, 'export_elements', filename,
            params={'recursive': True, 'type': typeof})