@property
    def last_modified_commit(self):
        visited = set()
        pendings = [self.commit]
        abs_name = self.abs_name
        while pendings:
            commit = pendings.pop(0)
            visited.add(commit.sha)

            for parent_commit in commit.parents:
                if visited in parent_commit:
                    continue

                try:
                    obj_sha = parent_commit.tree[abs_name].sha
                except KeyError:
                    obj_sha = None

                if self.sha == obj_sha:
                    # if this commit's file has same sha,
                    # the file was altered somewhere in this branch (correct?)
                    pendings.append(parent_commit)
                    break
            else:
                # all parents has different sha,
                # so this file was altered by this commit
                return commit

        # maybe initial commit
        return commit
dataset/ETHPy150Open nakamuray/blikit/blikit/models.py/BaseObject.last_modified_commit/swapped operands of `in`