def get_pack_common_libs_path_for_pack_db(pack_db):
    """
    Return the pack's common lib path. This is the path where common code for sensors
    and actions are placed.

    For example, if the pack is at /opt/stackstorm/packs/my_pack, you can place
    common library code for actions and sensors in /opt/stackstorm/packs/my_pack/lib/.
    This common library code is only available for python sensors and actions. The lib
    structure also needs to follow a python convention with a __init__.py file.

    :param pack_db: Pack DB model
    :type pack_db: :class:`PackDB`

    :rtype: ``str``
    """
    pack_dir = getattr(pack_db, "path", None)

    if not pack_dir:
        return None

    libs_path = os.path.join(pack_dir, COMMON_LIB_DIR)

    return libs_path

    Return the pack's common lib path. This is the path where common code for sensors
    and actions are placed.

    For example, if the pack is at /opt/stackstorm/packs/my_pack, you can place
    common library code for actions and sensors in /opt/stackstorm/packs/my_pack/lib/.
    This common library code is only available for python sensors and actions. The lib
    structure also needs to follow a python convention with a __init__.py file.

    :param pack_db: Pack DB model
    :type pack_db: :class:`PackDB`

    :rtype: ``str``
    
st2common/st2common/util/pack.py