<commit_before># -*- coding: utf-8 -*-

r"""
The :mod:`pygsp.optimization` module provides tools for convex optimization on
graphs.
"""

from pygsp import utils


logger = utils.build_logger(__name__)


def _import_pyunlocbox():
    try:
        from pyunlocbox import functions, solvers
    except Exception:
        raise ImportError('Cannot import pyunlocbox, which is needed to solve '
                          'this optimization problem. Try to install it with '
                          'pip (or conda) install pyunlocbox.')
    return functions, solvers
<commit_msg>doc: formulation<commit_after># -*- coding: utf-8 -*-

r"""
The :mod:`pygsp.optimization` module provides tools to solve convex
optimization problems on graphs.
"""

from pygsp import utils


logger = utils.build_logger(__name__)


def _import_pyunlocbox():
    try:
        from pyunlocbox import functions, solvers
    except Exception:
        raise ImportError('Cannot import pyunlocbox, which is needed to solve '
                          'this optimization problem. Try to install it with '
                          'pip (or conda) install pyunlocbox.')
    return functions, solvers

{'fraction_non_alphanumeric': 0.0831191088260497, 'fraction_numerical': 0.001713796058269066, 'mean_word_length': 2.6729559748427674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1318899', 'n_tokens_mistral': 322, 'n_tokens_neox': 317, 'n_words': 113}