A value visitor, which visits instances (typically), applies
        :py:meth:`normalize.visitor.VisitorPattern.apply` to every attribute
        slot, and returns the reduced result.

        Like :py:func:`normalize.diff.diff`, this function accepts a series of
        keyword arguments, which are passed through to
        :py:class:`normalize.visitor.Visitor`.

        This function also takes positional arguments:

            ``value=``\ *object*
                The value to visit.  Normally (but not always) a
                :py:class:`normalize.record.Record` instance.

            ``value_type=``\ *RecordType*
                This is the ``Record`` subclass to interpret ``value`` as.  The
                default is ``type(value)``.  If you specify this, then the type
                information on ``value`` is essentially ignored (with the
                caveat mentioned below on :py:meth:`Visitor.map_prop`), and may
                be a ``dict``, ``list``, etc.

            ``**kwargs``
                Visitor options accepted by
                :py:meth:`normalize.visitor.Visitor.__init__`.

def visit(cls, value, value_type=None, **kwargs):
        """A value visitor, which visits instances (typically), applies
        :py:meth:`normalize.visitor.VisitorPattern.apply` to every attribute
        slot, and returns the reduced result.

        Like :py:func:`normalize.diff.diff`, this function accepts a series of
        keyword arguments, which are passed through to
        :py:class:`normalize.visitor.Visitor`.

        This function also takes positional arguments:

            ``value=``\ *object*
                The value to visit.  Normally (but not always) a
                :py:class:`normalize.record.Record` instance.

            ``value_type=``\ *RecordType*
                This is the ``Record`` subclass to interpret ``value`` as.  The
                default is ``type(value)``.  If you specify this, then the type
                information on ``value`` is essentially ignored (with the
                caveat mentioned below on :py:meth:`Visitor.map_prop`), and may
                be a ``dict``, ``list``, etc.

            ``**kwargs``
                Visitor options accepted by
                :py:meth:`normalize.visitor.Visitor.__init__`.
        """
        visitor = cls.Visitor(
            cls.unpack, cls.apply, cls.aggregate, cls.reduce,
            **kwargs)

        if not value_type:
            value_type = type(value)
            if not issubclass(value_type, Record):
                raise TypeError(
                    "Cannot visit %s instance" % value_type.__name__
                )

        return cls.map(visitor, value, value_type)