Not ideal, but as a kludged work-around:
[source, python]
----
code line 16 # <16>
code line 17 # <17>
----
image:16.png[] The comments on code line 16.
image:17.png[] The comments on code line 17.
[source, python]
----
code line 18 # <18>
code line 19 # <19>
code line 20 # <20>
code line 21 # <21>
----
image:18.png[] The comments on code line 18.
image:19.png[] The comments on code line 19.
image:20.png[] The comments on code line 20.
image:21.png[] The comments on code line 21.
Not an ideal solution, as the "png callouts" are not sized the same as the callouts AsciiDoctor generates, but it kind of works.