def __init__(self, fields=None, name=DEFAULT_STREAM_ID, direct=False):
if fields is None:<EOL><INDENT>fields = []<EOL><DEDENT>elif isinstance(fields, (list, tuple)):<EOL><INDENT>fields = list(fields)<EOL>for field in fields:<EOL><INDENT>if not isinstance(field, str):<EOL><INDENT>raise TypeError("<STR_LIT>" % str(field))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>" % str(fields))<EOL><DEDENT>self.fields = fields<EOL>if name is None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>elif isinstance(name, str):<EOL><INDENT>self.stream_id = name<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>" % str(name))<EOL><DEDENT>if isinstance(direct, bool):<EOL><INDENT>self.direct = direct<EOL>if self.direct:<EOL><INDENT>raise NotImplementedError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>" % str(direct))<EOL><DEDENT>
:type fields: `list` or `tuple` of `str`
:param fields: field names for this stream
:type name: str
:param name: name of stream. Defaults to ``default``
:type direct: bool
:param direct: whether or not this stream is direct. Default is ``False``