def get_pack_ref(pack_dir):
    """
    Read pack reference from the metadata file and sanitize it.
    """
    metadata = get_pack_metadata(pack_dir=pack_dir)
    pack_ref = get_pack_ref_from_metadata(metadata=metadata, pack_directory_name=None)
    return pack_ref

    Read pack reference from the metadata file and sanitize it.
    
st2common/st2common/util/pack_management.py