def action(bucket: tp.Any) -> None: if new_data is None: bucket.Object(bk.key).delete() else: bucket.put_object(Key=bk.key, Body=new_data)