def _covert_to_hashable(data):
    r"""
    Args:
        data (?):

    Returns:
        ?:

    CommandLine:
        python -m utool.util_hash _covert_to_hashable

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_hash import *  # NOQA
        >>> from utool.util_hash import _covert_to_hashable  # NOQA
        >>> import utool as ut
        >>> data = np.array([1], dtype=np.int64)
        >>> result = _covert_to_hashable(data)
        >>> print(result)
    """
    if isinstance(data, six.binary_type):
        hashable = data
        prefix = b'TXT'
    elif util_type.HAVE_NUMPY and isinstance(data, np.ndarray):
        if data.dtype.kind == 'O':
            msg = '[ut] hashing ndarrays with dtype=object is unstable'
            warnings.warn(msg, RuntimeWarning)
            hashable = data.dumps()
        else:
            hashable = data.tobytes()
        prefix = b'NDARR'
    elif isinstance(data, six.text_type):
        # convert unicode into bytes
        hashable = data.encode('utf-8')
        prefix = b'TXT'
    elif isinstance(data, uuid.UUID):
        hashable = data.bytes
        prefix = b'UUID'
    elif isinstance(data, int):
        # warnings.warn('[util_hash] Hashing ints is slow, numpy is prefered')
        hashable = _int_to_bytes(data)
        # hashable = data.to_bytes(8, byteorder='big')
        prefix = b'INT'
    # elif isinstance(data, float):
    #     hashable = repr(data).encode('utf8')
    #     prefix = b'FLT'
    elif util_type.HAVE_NUMPY and isinstance(data, np.int64):
        return _covert_to_hashable(int(data))
    elif util_type.HAVE_NUMPY and isinstance(data, np.float64):
        a, b = float(data).as_integer_ratio()
        hashable = (a.to_bytes(8, byteorder='big') +
                    b.to_bytes(8, byteorder='big'))
        prefix = b'FLOAT'
    else:
        raise TypeError('unknown hashable type=%r' % (type(data)))
        # import bencode
        # hashable = bencode.Bencoder.encode(data).encode('utf-8')
        # prefix = b'BEN'
    prefix = b''
    return prefix, hashable
r"""
    Args:
        data (?):

    Returns:
        ?:

    CommandLine:
        python -m utool.util_hash _covert_to_hashable

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_hash import *  # NOQA
        >>> from utool.util_hash import _covert_to_hashable  # NOQA
        >>> import utool as ut
        >>> data = np.array([1], dtype=np.int64)
        >>> result = _covert_to_hashable(data)
        >>> print(result)