def calculate_dtype(app_name) ->str:
    """
    For generic extractors try to return a more
    specific type we can be if reasonably sure.
    """
    app_name_lower = app_name.lower()
    for name, dtype in (('update', 'desktop app'), ('mail', 'pim'), ('api',
        'library'), ('sdk', 'library'), ('webview', 'browser')):
        if name in app_name_lower:
            return dtype
    return 'generic'
