docs: def query_expired(cls, dt, bucket=None):
          """Query all uncompleted multipart uploads."""
          q = cls.query.filter(cls.created < dt).filter_by(completed=True)
          if bucket:
              q = q.filter(cls.bucket_id == as_bucket_id(bucket))
          return q