code: def check_parameter_features(param: par.Parameter) -> None:
      seed = np.random.randint(2**32, dtype=np.uint32)
      print(f"Seeding with {seed} from reproducibility.")
      np.random.seed(seed)
      assert isinstance(param.name, str)
      # assert param._random_state is None  # TODO no more true because of layers :s
      assert param.generation == 0
      child = param.spawn_child()
      assert isinstance(child, type(param))
      assert child.heritage["lineage"] == param.uid
      assert child.generation == 1
      assert not np.any(
          param.get_standardized_data(reference=param) > 1e-7
      )
      assert not np.any(
          child.get_standardized_data(reference=child) > 1e-7
      )
      assert not np.any(
          child.get_standardized_data(reference=param) > 1e-7
      )
      assert child.name == param.name
      assert param._random_state is not None
      assert child.random_state is param.random_state
      assert child.uid != param.uid
      assert child.parents_uids == [param.uid]
      mutable = True
      try:
          child.mutate()
      except errors.UnsupportedParameterOperationError:
          mutable = False
      else:
          if not isinstance(child, par.TransitionChoice):
              # transition choice has a fixed set of values so can be the same
              assert np.any(
                  child.get_standardized_data(reference=param)
              )
      param.set_name("blublu")
      child_hash = param.spawn_child()
      assert child_hash.name == "blublu"
      param.value = child.value
      try:
          assert param.get_value_hash() == child.get_value_hash()
      except AssertionError:
          # with approximations, value hash may return something slightly different
          # so let's try a relaxed version
          param2 = param.spawn_child()
          param2.value = child.value
          assert param2.get_value_hash() == param.get_value_hash()
      if isinstance(param, par.Data):
          assert param.get_value_hash() != child_hash.get_value_hash()
          child_hash.value = param.value
          np.testing.assert_almost_equal(
              param.get_standardized_data(reference=child), np.zeros(param.dimension)  # type: ignore
          )
      if mutable:
          param.recombine(child, child)
          param.recombine()  # empty should work, for simplicity's sake
      # constraints
      param.register_cheap_constraint(_true)
      with pytest.warns(UserWarning):
          param.register_cheap_constraint(lambda *args, **kwargs: False)
      child2 = param.spawn_child(param.value)  # just checking new_value
      assert child.satisfies_constraints()
      assert not param.satisfies_constraints()
      assert not child2.satisfies_constraints()
      # array to and from with hash
      data = param.get_standardized_data(reference=child2)
      param.set_standardized_data(data, reference=child2)
      np.testing.assert_array_almost_equal(
          param.get_standardized_data(reference=child2), data
      )
      # picklable
      string = pickle.dumps(child)
      pickle.loads(string)
      # sampling
      samp_param = param.sample()
      assert samp_param.uid == samp_param.heritage["lineage"]
      # set function properties
      assert param.function.deterministic
      assert not param.function.proxy
      param.function.deterministic = False
      param.function.proxy = True
      # function properties should be transfered to children
      func_child = param.spawn_child()
      assert not func_child.function.deterministic
      assert func_child.function.proxy
  
imports: import pickle
  import typing
  import pytest
  import numpy
  from nevergrad.common import errors
  from .None import parameter
label_desc: Use image node_id 5 for calling a global function with example usage: check_parameter_features(param) without return types