docs: def flat_map(self, func=None, name=None):
          """
          Maps and flatterns each tuple from this stream into 0 or more tuples.
  
  
          For each tuple on this stream ``func(tuple)`` is called.
          If the result is not `None` then the the result is iterated over
          with each value from the iterator that is not `None` will be submitted
          to the return stream.
  
          If the result is `None` or an empty iterable then no tuples are submitted to
          the returned stream.
          
          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.
                  This is suitable when each tuple on this stream is an iterable to be flattened.
                  
              name(str): Name of the flattened 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 tuples are submitted to the flattened
          and mapped stream corresponding to the input tuple
          that caused the exception.
  
          Returns:
              Stream: A Stream containing flattened and mapped tuples.
          Raises:
              TypeError: if `func` does not return an iterator nor None
  
          .. versionchanged:: 1.11 `func` is optional.
          """     
          if func is None:
              func = streamsx.topology.runtime._identity
              if name is None:
                 name = 'flatten'
       
          sl = _SourceLocation(_source_info(), 'flat_map')
          _name = self.topology.graph._requested_name(name, action='flat_map', func=func)
          stateful = self._determine_statefulness(func)
          op = self.topology.graph.addOperator(self.topology.opnamespace+"::FlatMap", func, name=_name, sl=sl, stateful=stateful)
          op.addInputPort(outputPort=self.oport)
          streamsx.topology.schema.StreamSchema._fnop_style(self.oport.schema, op, 'pyStyle')
          oport = op.addOutputPort(name=_name)
          return Stream(self.topology, oport)._make_placeable()._layout('FlatMap', name=_name, orig_name=name)