code: def test_compute_perceptron() -> None:
      p = np.random.normal(size=10)
      data = np.random.normal(size=(5, 2))
      square_sum = 0
      # compute explicitely the article function:
      # g(x) = v0+v1tanh(w01+x·w11)+v2tanh(w02+x·w12)+v3tanh(w03+x·w13)
      for x, y in data:
          z = p[-1]
          for k in range(3):
              z += p[6 + k] * np.tanh(p[3 + k] + p[k] * x)
          square_sum += (z - y) ** 2
      output = problems.Perceptron(data[:, 0], data[:, 1]).copy()(p)
      np.testing.assert_almost_equal(output, square_sum / 5)
  
file_path: nevergrad/nevergrad/functions/mlda/test_problems.py
imports: from unittest.mock import patch
  import numpy
  import pandas
  from ...common import testing
  from .None import problems
label_desc: Use image node_id 3 for calling a global function with example usage: test_compute_perceptron() without return types