def METHOD_NAME(self, filename: str) -> str:
    """
    Derives a human-readable title from a filename using the defined
    canonicalization rules, if any. This is used to later update the
    screenshot.
    """
    for pattern, repl in self.canonicalization_rules:
        filename = re.sub(pattern, repl, filename)
    return filename