code: def parse_file_type(file_type):
      '''
      :param file_type: file type string 'description (*.file_extension1;*.file_extension2)' as required by file filter in create_file_dialog
      :return: (description, file extensions) tuple
      '''
      valid_file_filter = r'^([\w ]+)\((\*(?:\.(?:\w+|\*))*(?:;\*\.\w+)*)\)$'
      match = re.search(valid_file_filter, file_type)
  
      if match:
          return match.group(1).rstrip(), match.group(2)
      else:
          raise ValueError('{0} is not a valid file filter'.format(file_type)f parse_file_type(file_type):
      '''
      :param file_type: file type string 'description (*.file_extension1;*.file_extension2)' as required by file filter in create_file_dialog
      :return: (description, file extensions) tuple
      '''
      valid_file_filter = r'^([\w ]+)\((\*(?:\.(?:\w+|\*))*(?:;\*\.\w+)*)\)$'
      match = re.search(valid_file_filter, file_type)
  
      if match:
          return match.group(1).rstrip(), match.group(2)
      else:
          raise ValueError('{0} is not a valid file filter'.format(file_type))
docs: :param file_type: file type string 'description (*.file_extension1;*.file_extension2)' as required by file filter in create_file_dialog
      :return: (description, file extensions) tuple