def get_ref_names_ordered_by_last_commit(self, prefix, exclude=None):
        def get_commit_time(refname):
            obj = self[refs[refname]]
            if isinstance(obj, dulwich.objects.Tag):
                return obj.tag_time
            return obj.commit_time

        refs = self.refs.as_dict(encode_for_git(prefix))
        if exclude:
            refs.pop(prefix + exclude, None)
        sorted_names = sorted(refs.keys(), key=get_commit_time, reverse=True)
        return [decode_from_git(ref) for ref in sorted_names]
Return a list of ref names that begin with `prefix`, ordered by the
dataset/ETHPy150Open jonashaag/klaus/klaus/repo.py/FancyRepo.get_ref_names_ordered_by_last_commit