def for_each(self, func, name=None):
sl = _SourceLocation(_source_info(), '<STR_LIT>')<EOL>_name = self.topology.graph._requested_name(name, action='<STR_LIT>', func=func)<EOL>stateful = self._determine_statefulness(func)<EOL>op = self.topology.graph.addOperator(self.topology.opnamespace+"<STR_LIT>", func, name=_name, sl=sl, stateful=stateful)<EOL>op.addInputPort(outputPort=self.oport)<EOL>streamsx.topology.schema.StreamSchema._fnop_style(self.oport.schema, op, '<STR_LIT>')<EOL>op._layout(kind='<STR_LIT>', name=_name, orig_name=name)<EOL>return Sink(op)<EOL>
Sends information as a stream to an external system.

For each tuple `t` on the stream ``func(t)`` is called.

Args:
    func: A callable that takes a single parameter for the tuple and returns None.
    name(str): Name of the stream, defaults to a generated name.

If invoking ``func`` for a tuple on the stream raises an exception
then its processing element will terminate. By default the processing
element will automatically restart though tuples may be lost.

If ``func`` is a callable object then it may suppress exceptions
by return a true value from its ``__exit__`` method. When an
exception is suppressed no further processing occurs for the
input tuple that caused the exception.

Returns:
    streamsx.topology.topology.Sink: Stream termination.

.. versionchanged:: 1.7
    Now returns a :py:class:`Sink` instance.