# Path: osprofiler/_utils.py
# def split(text, strip=True):
# def binary_encode(text, encoding="utf-8"):
# def binary_decode(data, encoding="utf-8"):
# def generate_hmac(data, hmac_key):
# def signed_pack(data, hmac_key):
# def signed_unpack(data, hmac_data, hmac_keys):
# def itersubclasses(cls, _seen=None):
# def import_modules_from_package(package):
# def shorten_id(span_id):
# 
# Path: osprofiler/tests/test.py
# class TestCase(testcase.TestCase):
# class FunctionalTestCase(TestCase):
#     def setUp(self):


import base64
import hashlib
import hmac
import uuid
from unittest import mock
from osprofiler import _utils as utils
from osprofiler.tests import test
            expected = 9584796812364680686

            self.assertEqual(expected, result)

    @mock.patch("oslo_utils.uuidutils.generate_uuid")
    def test_shorten_id_with_invalid_uuid(self, mock_gen_uuid):
        invalid_id = "invalid"
        mock_gen_uuid.return_value = "1c089ea8-28fe-4f3d-8c00-f6daa2bc32f1"

        result = utils.shorten_id(invalid_id)
        expected = 10088334584203457265

        self.assertEqual(expected, result)

    def test_itersubclasses(self):

        class A(object):
            pass

        class B(A):
            pass

        class C(A):
            pass

        class D(C):
            pass

        self.assertEqual([B, C, D], list(utils.itersubclasses(A)))


# Path: osprofiler/_utils.py
# def split(text, strip=True):
# def binary_encode(text, encoding="utf-8"):
# def binary_decode(data, encoding="utf-8"):
# def generate_hmac(data, hmac_key):
# def signed_pack(data, hmac_key):
# def signed_unpack(data, hmac_data, hmac_keys):
# def itersubclasses(cls, _seen=None):
# def import_modules_from_package(package):
# def shorten_id(span_id):
# 
# Path: osprofiler/tests/test.py
# class TestCase(testcase.TestCase):
# class FunctionalTestCase(TestCase):
#     def setUp(self):


# Path: osprofiler/tests/unit/test_utils.py
import base64
import hashlib
import hmac
import uuid
from unittest import mock
from osprofiler import _utils as utils
from osprofiler.tests import test

            expected = 9584796812364680686

            self.assertEqual(expected, result)

    @mock.patch("oslo_utils.uuidutils.generate_uuid")
    def test_shorten_id_with_invalid_uuid(self, mock_gen_uuid):
        invalid_id = "invalid"
        mock_gen_uuid.return_value = "1c089ea8-28fe-4f3d-8c00-f6daa2bc32f1"

        result = utils.shorten_id(invalid_id)
        expected = 10088334584203457265

        self.assertEqual(expected, result)

    def test_itersubclasses(self):

        class A(object):
            pass

        class B(A):
            pass

        class C(A):
            pass

        class D(C):
            pass

        self.assertEqual([B, C, D], list(utils.itersubclasses(A)))


        class E(type):