def map(self, func=None, name=None, schema=None):
if schema is None:<EOL><INDENT>schema = streamsx.topology.schema.CommonSchema.Python<EOL><DEDENT>if func is None:<EOL><INDENT>func = streamsx.topology.runtime._identity<EOL>if name is None:<EOL><INDENT>name = '<STR_LIT>'<EOL><DEDENT><DEDENT>ms = self._map(func, schema=schema, name=name)._layout('<STR_LIT>')<EOL>ms.oport.operator.sl = _SourceLocation(_source_info(), '<STR_LIT>')<EOL>return ms<EOL>
Maps each tuple from this stream into 0 or 1 stream tuples.

For each tuple on this stream ``result = func(tuple)`` is called.
If `result` is not `None` then the result will be submitted
as a tuple on the returned stream. If `result` is `None` then
no tuple submission will occur.

By default the submitted tuple is ``result`` without modification
resulting in a stream of picklable Python objects. Setting the
`schema` parameter changes the type of the stream and
modifies each ``result`` before submission.

* ``object`` or :py:const:`~streamsx.topology.schema.CommonSchema.Python` - The default:  `result` is submitted.
* ``str`` type (``unicode`` 2.7) or :py:const:`~streamsx.topology.schema.CommonSchema.String` - A stream of strings: ``str(result)`` is submitted.
* ``json`` or :py:const:`~streamsx.topology.schema.CommonSchema.Json` - A stream of JSON objects: ``result`` must be convertable to a JSON object using `json` package.
* :py:const:`~streamsx.topology.schema.StreamSchema` - A structured stream. `result` must be a `dict` or (Python) `tuple`. When a `dict` is returned the outgoing stream tuple attributes are set by name, when a `tuple` is returned stream tuple attributes are set by position.
* string value - Equivalent to passing ``StreamSchema(schema)``

Args:
    func: A callable that takes a single parameter for the tuple.
        If not supplied then a function equivalent to ``lambda tuple_ : tuple_`` is used.
    name(str): Name of the mapped stream, defaults to a generated name.
    schema(StreamSchema|CommonSchema|str): Schema of the resulting stream.

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 tuple is submitted to the mapped
stream corresponding to the input tuple that caused the exception.


Returns:
    Stream: A stream containing tuples mapped by `func`.

.. versionadded:: 1.7 `schema` argument added to allow conversion to
    a structured stream.
.. versionadded:: 1.8 Support for submitting `dict` objects as stream tuples to a structured stream (in addition to existing support for `tuple` objects).
.. versionchanged:: 1.11 `func` is optional.