code: def test_instrumentation_copy() -> None:
      instru = p.Instrumentation(
          p.Scalar(), 3, b=p.Choice(list(range(1000)))
      ).set_name("bidule")
      instru.register_cheap_constraint(_false)
      copied = instru.copy()
      assert copied.name == "bidule"
      assert copied.random_state is not instru.random_state
      # test that variables do not hold a random state / interfere
      instru.random_state = np.random.RandomState(12)
      copied.random_state = np.random.RandomState(12)
      kwargs1 = (
          instru.spawn_child().set_standardized_data([0] * 1001).kwargs
      )
      kwargs2 = (
          copied.spawn_child().set_standardized_data([0] * 1001).kwargs
      )
      assert kwargs1 == kwargs2
      assert not copied.satisfies_constraints()
  
file_path: nevergrad/nevergrad/parametrization/test_parameters_legacy.py
imports: import typing
  import numpy
  import pytest
  from .None import parameter
label_desc: Use image node_id 4 for calling a global function with example usage: test_instrumentation_copy() without return types