def as_tuple(self, named=None):
if not named:<EOL><INDENT>return self._copy(tuple)<EOL><DEDENT>if named == True or isinstance(named, basestring):<EOL><INDENT>return self._copy(self._make_named_tuple(name=named))<EOL><DEDENT>return self._copy(tuple)<EOL>
Create a structured schema that will pass stream tuples into callables as ``tuple`` instances.

If this instance represents a common schema then it will be returned
without modification. Stream tuples with common schemas are
always passed according to their definition.

**Passing as tuple**

When `named` evaluates to ``False`` then each stream tuple will
be passed as a ``tuple``. For example with a structured schema
of ``tuple<rstring id, float64 value>`` a value is passed as
``('TempSensor', 27.4)`` and access to the first attribute
is ``t[0]`` and the second as ``t[1]`` where ``t`` represents
the passed value..

**Passing as named tuple**

When `named` is ``True`` or a ``str`` then each stream tuple will
be passed as a named tuple. For example with a structured schema
of ``tuple<rstring id, float64 value>`` a value is passed as
``('TempSensor', 27.4)`` and access to the first attribute
is ``t.id`` (or ``t[0]``) and the second as ``t.value`` (``t[1]``)
where ``t`` represents the passed value.

.. warning:: If an schema's attribute name is not a valid Python identifier or
    starts with an underscore then it will be renamed as positional name ``_n``.
    For example, with the schema ``tuple<int32 a, int32 def, int32 id>`` the
    field names are ``a``, ``_1``, ``_2``.


The value of `named` is used as the name of the named tuple
class with ``StreamTuple`` used when `named` is ``True``.

It is not guaranteed that the class of the namedtuple is the
same for all callables processing tuples with the same
structured schema, only that the tuple is a named tuple
with the correct field names.

Args:
    named: Pass stream tuples as a named tuple.
        If not set then stream tuples are passed as
        instances of ``tuple``.

Returns:
    StreamSchema: Schema passing stream tuples as ``tuple`` if allowed.

.. versionadded:: 1.8
.. versionadded:: 1.9 Addition of `named` parameter.