code: def test_custom_classifier_metrics():
      """Check whether greater_is_better works for SymbolicClassifier."""
  
      x_data = check_random_state(0).uniform(-1, 1, 100).reshape(50, 2)
      y_true = x_data[:, 0] ** 2 + x_data[:, 1] ** 2
      y_true = (y_true < y_true.mean()).astype(int)
  
      est_gp = SymbolicClassifier(
          metric="log loss",
          stopping_criteria=0.000001,
          random_state=415,
          parsimony_coefficient=0.01,
          init_method="full",
          init_depth=(2, 4),
      )
      est_gp.fit(x_data, y_true)
      formula = est_gp.__str__()
      expected_formula = "sub(0.364, mul(add(X0, X0), add(X0, X0)))"
      assert expected_formula == formula
  
      def negative_log_loss(y, y_pred, w):
          """Calculate the log loss."""
          eps = 1e-15
          y_pred = np.clip(y_pred, eps, 1 - eps)
          score = y * np.log(y_pred) + (1 - y) * np.log(1 - y_pred)
          return np.average(score, weights=w)
  
      customized_fitness = make_fitness(
          function=negative_log_loss, greater_is_better=True
      )
  
      c_est_gp = SymbolicClassifier(
          metric=customized_fitness,
          stopping_criteria=0.000001,
          random_state=415,
          parsimony_coefficient=0.01,
          init_method="full",
          init_depth=(2, 4),
      )
      c_est_gp.fit(x_data, y_true)
      c_formula = c_est_gp.__str__()
      assert expected_formula == c_formula
  
file_path: gplearn/gplearn/tests/test_fitness.py
imports: import pickle
  import numpy
  from sklearn.datasets import load_diabetes, load_breast_cancer
  from sklearn.metrics import mean_absolute_error
  from sklearn.utils._testing import assert_raises
  from sklearn.utils.validation import check_random_state
  from gplearn.genetic import SymbolicRegressor, SymbolicClassifier
  from gplearn.genetic import SymbolicTransformer
  from gplearn.fitness import make_fitness, _mean_square_error
label_desc: Use image node_id 4 for calling a global function with example usage: test_custom_classifier_metrics() and returns: np