def create_component(tag_name, allow_children=True):
    """
    Create a component for an HTML Tag

    Examples:
        >>> marquee = create_component('marquee')
        >>> marquee('woohoo')
        <marquee>woohoo</marquee>
    """

    def _component(*children, **kwargs):
        if 'children' in kwargs:
            children = kwargs.pop('children')
        else:
            # Flatten children under specific circumstances
            # This supports the use case of div([a, b, c])
            # And allows users to skip the * operator
            if len(children) == 1 and isinstance(children[0], list):
                # We want children to be tuples and not lists, so
                # they can be immutable
                children = tuple(children[0])
        style = None
        event_handlers = None
        attributes = dict(**kwargs)
        if 'style' in kwargs:
            style = kwargs.pop('style')
        if 'attributes' in kwargs:
            attributes = kwargs['attributes']
        for key, value in attributes.items():
            if callable(value):
                attributes = attributes.copy()
                if event_handlers == None:
                    event_handlers = {key: attributes.pop(key)}
                else:
                    event_handlers[key] = attributes.pop(key)
        if not allow_children and children:
            # We don't allow children, but some were passed in
            raise ValueError('<{tag_name} /> cannot have children'.format(tag_name=tag_name))

        v = VDOM(tag_name, attributes, style, children, None, event_handlers)
        return v

    return _component
Create a component for an HTML Tag

    Examples:
        >>> marquee = create_component('marquee')
        >>> marquee('woohoo')
        <marquee>woohoo</marquee>