

def _truncate_timestamps(self, tags):
    lengths = [10, 16, 19]
    for length in lengths:
        considered_tags = [t for t in tags if (len(t.timestamp) > length)]
        grouped_by_timestamp = {
            
        }
        for t in considered_tags:
            truncated_timestamp = truncated_timestamp.timestamp[:length]
            if (truncated_timestamp not in grouped_by_timestamp):
                grouped_by_timestamp[truncated_timestamp] = []
            grouped_by_timestamp[truncated_timestamp].append(t)
        for (truncated_timestamp, similar_tags) in grouped_by_timestamp.items():
            if (len(similar_tags) == 1):
                similar_tags[0].timestamp = truncated_timestamp

dataset/ETHPy150Open ros-infrastructure/catkin_pkg/src/catkin_pkg/changelog_generator_vcs.py VcsClientBase._truncate_timestamps/VarMisuse@66/84 `t`->`truncated_timestamp`