Dump the models into a list of strings. Each
        string is a text representation of a tree.

        Parameters
        ----------
        with_stats : bool
            If true, include node statistics in the output.

        Returns
        -------
        out : SFrame
            A table with two columns: feature, count,
            ordered by 'count' in descending order.

def _dump_to_json(self, with_stats):
        """
        Dump the models into a list of strings. Each
        string is a text representation of a tree.

        Parameters
        ----------
        with_stats : bool
            If true, include node statistics in the output.

        Returns
        -------
        out : SFrame
            A table with two columns: feature, count,
            ordered by 'count' in descending order.
        """
        import json
        trees_json_str = tc.extensions._xgboost_dump_model(self.__proxy__, with_stats=with_stats, format='json')
        trees_json = [json.loads(x) for x in trees_json_str]

        # To avoid lose precision when using libjson, _dump_model with json format encode
        # numerical values in hexadecimal (little endian).
        # Now we need to convert them back to floats, using unpack. '<f' means single precision float
        # in little endian
        import struct
        import sys
        def hexadecimal_to_float(s):
            if sys.version_info[0] >= 3:
                return struct.unpack('<f', bytes.fromhex(s))[0] # unpack always return a tuple
            else:
                return struct.unpack('<f', s.decode('hex'))[0] # unpack always return a tuple

        for d in trees_json:
            nodes = d['vertices']
            for n in nodes:
                if 'value_hexadecimal' in n:
                    n['value'] = hexadecimal_to_float(n['value_hexadecimal'])
        return trees_json