GenEvent.terminate

You're seeing just the callback terminate, go back to GenEvent module for more information.
Link to this callback

terminate(reason, state)

View Source

Specs

terminate(reason, state :: term()) :: term()
when reason:
       :stop | {:stop, term()} | :remove_handler | {:error, term()} | term()