def filter(self, record):
        parts = record.name.split(".")
        if len(parts) <= 3:
            display_name = record.name
        else:
            # For example, "a.b.c.d" becomes "a.b...d".
            display_name = '.'.join(parts[:2] + ['.', parts[-1]])
        record.display_name = display_name
        return True
dataset/ETHPy150Open cjerdonek/open-rcv/openrcv/scripts/run.py/TruncatedDisplayNameFilter.filter/original