Almost the same, but improved since it has a galvanic isolation and inverted output. However your exaple implies that "another circuit" is sink output (open collector).


<!-- Begin schematic: In order to preserve an editable schematic, please
     don't edit this section directly.
     Click the "edit" link below the image in the preview instead. -->

![schematic](https://i.sstatic.net/V8rJ7.png)

<!-- End schematic -->