Create a component for an HTML Tag
    Examples:
        >>> marquee = _create_component('marquee')
        >>> marquee('woohoo')
        <marquee>woohoo</marquee>

def _create_component(tag_name, allow_children=True, callbacks=[]):
    """
    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])
        if 'style' in kwargs:
            style = kwargs.pop('style')
        else:
            style = None
        if 'attributes' in kwargs:
            attributes = kwargs['attributes']
        else:
            attributes = dict(**kwargs)

        if (tag_name == 'a') and ('href' not in attributes):
            attributes['href'] = '#'

        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))

        for cb in callbacks:
            cbname = cb['name']
            if cbname in attributes:
                if attributes[cbname] is not None:
                    from google.colab import output as colab_output
                    callback_id = cbname+'callback-' + str(uuid.uuid4())
                    register_callback(callback_id, attributes[cbname])
                    #js="google.colab.kernel.invokeFunction('{callback_id}', [], {kwargs})"
                    js = "window.vdomr_invokeFunction('{callback_id}', [], {kwargs})"
                    js = js.replace('{callback_id}', callback_id)
                    js = js.replace('{kwargs}', cb['kwargs'])
                    attributes[cbname] = js
                else:
                    attributes[cbname] = ''

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

    return _component