def filename_task(task, session):
    items = task.items if task.is_album else [task.item]

    # Look for suspicious (empty or meaningless) titles.
    missing_titles = sum(bad_title(i.title) for i in items)

    if missing_titles:
        # Get the base filenames (no path or extension).
        names = {}
        for item in items:
            path = displayable_path(item.path)
            name, _ = os.path.splitext(os.path.basename(path))
            names[item] = name

        # Look for useful information in the filenames.
        for pattern in PATTERNS:
            d = all_matches(names, pattern)
            if d:
                apply_matches(d)
Apply a function to a DataFrame that is intended to operate
dataset/ETHPy150Open beetbox/beets/beetsplug/fromfilename.py/filename_task--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/sparse/frame.py/SparseDataFrame.applymap