def METHOD_NAME(self):
    assert self.key is not None
    assert self.id is not None
    if self.chunks is None:
        yield ATTACHMENT_UNCHUNKED_DATA_KEY.format(key=self.key, id=self.id)
        return
    for chunk_index in range(self.chunks):
        yield ATTACHMENT_DATA_CHUNK_KEY.format(
            key=self.key, id=self.id, chunk_index=chunk_index
        )