@classmethod<EOL><INDENT>def spec(cls, name=None, par=<NUM_LIT:1>, config=None, optional_outputs=None):<DEDENT>
python_class_path = "<STR_LIT>" % (cls.__module__, cls.__name__)<EOL>if hasattr(cls, '<STR_LIT>'):<EOL><INDENT>_outputs = copy.copy(cls.outputs)<EOL><DEDENT>else:<EOL><INDENT>_outputs = []<EOL><DEDENT>if optional_outputs is not None:<EOL><INDENT>assert isinstance(optional_outputs, (list, tuple))<EOL>for out in optional_outputs:<EOL><INDENT>assert isinstance(out, (str, Stream))<EOL>_outputs.append(out)<EOL><DEDENT><DEDENT>return HeronComponentSpec(name, python_class_path, is_spout=True, par=par,<EOL>inputs=None, outputs=_outputs, config=config)<EOL>
Register this spout to the topology and create ``HeronComponentSpec``

        The usage of this method is compatible with StreamParse API, although it does not create
        ``ShellBoltSpec`` but instead directly registers to a ``Topology`` class.

        This method takes an optional ``outputs`` argument for supporting dynamic output fields
        declaration. However, it is recommended that ``outputs`` should be declared as
        an attribute of your ``Spout`` subclass. Also, some ways of declaring inputs is not supported
        in this implementation; please read the documentation below.

        :type name: str
        :param name: Name of this spout.
        :type par: int
        :param par: Parallelism hint for this spout.
        :type config: dict
        :param config: Component-specific config settings.
        :type optional_outputs: list of (str or Stream) or tuple of (str or Stream)
        :param optional_outputs: Additional output fields for this spout. These fields are added to
                                 existing ``outputs`` class attributes of your spout.
                                 This is an optional argument, and exists only for supporting dynamic
                                 output field declaration.