def _long_to_bytes(self, long_value):
        """
        Turns a long value into its byte string equivalent.
        :param long_value: the long value to be returned as a byte string
        :return: a byte string equivalent of a long value
        """
        _byte_string = b''
        pack = struct.pack
        while long_value > 0:
            _byte_string = pack(b'>I', long_value & 0xffffffff) + _byte_string
            long_value = long_value >> 32
        for i in range(len(_byte_string)):
            if _byte_string[i] != b'\000'[0]:
                break
        else:
            _byte_string = b'\000'
            i = 0
        _byte_string = _byte_string[i:]

        return _byte_string
Turns a long value into its byte string equivalent.
        :param long_value: the long value to be returned as a byte string
        :return: a byte string equivalent of a long value