code: def get_versions(cls, bucket, key, desc=True):
          filters = [
              cls.bucket_id == as_bucket_id(bucket),
              cls.key == key,
          ]
          order = cls.created.desc() if desc else cls.created.asc()
          return cls.query.filter(*filters).order_by(cls.key, order)