class_docstr: Parameter class.
  
  Basic usages with a name and  value:
  
      >>> param = Param('my_param', 10)
      >>> param.name
      'my_param'
      >>> param.value
      10
  
  Use with a validator to make sure the parameter always keeps a valid
  value.
  
      >>> param = Param(
      ...     name='my_param',
      ...     value=5,
      ...     validator=lambda x: 0 < x < 20
      ... )
      >>> param.validator  # doctest: +ELLIPSIS
      <function <lambda> at 0x...>
      >>> param.value
      5
      >>> param.value = 10
      >>> param.value
      10
      >>> param.value = -1
      Traceback (most recent call last):
          ...
      ValueError: Validator not satifised.
      The validator's definition is as follows:
      validator=lambda x: 0 < x < 20
  
  Use with a hyper space. Setting up a hyper space for a parameter makes the
  parameter tunable in a :class:`matchzoo.engine.Tuner`.
  
      >>> from matchzoo.engine.hyper_spaces import quniform
      >>> param = Param(
      ...     name='positive_num',
      ...     value=1,
      ...     hyper_space=quniform(low=1, high=5)
      ... )
      >>> param.hyper_space  # doctest: +ELLIPSIS
      <matchzoo.engine.hyper_spaces.quniform object at ...>
      >>> from hyperopt.pyll.stochastic import sample
      >>> hyperopt_space = param.hyper_space.convert(param.name)
      >>> samples = [sample(hyperopt_space) for _ in range(64)]
      >>> set(samples) == {1, 2, 3, 4, 5}
      True
  
  The boolean value of a :class:`Param` instance is only `True`
  when the value is not `None`. This is because some default falsy values
  like zero or an empty list are valid parameter values. In other words,
  the boolean value means to be "if the parameter value is filled".
  
      >>> param = Param('dropout')
      >>> if param:
      ...     print('OK')
      >>> param = Param('dropout', 0)
      >>> if param:
      ...     print('OK')
      OK
  
  A `_pre_assignment_hook` is initialized as a data type convertor if the
  value is set as a number to keep data type consistency of the parameter.
  This conversion supports python built-in numbers, `numpy` numbers, and
  any number that inherits :class:`numbers.Number`.
  
      >>> param = Param('float_param', 0.5)
      >>> param.value = 10
      >>> param.value
      10.0
      >>> type(param.value)
      <class 'float'>
docstr: :return: Value of the parameter.
docstr_tok: [":","return",":","Value","of","the","parameter","."]
code: def value(self) -> typing.Any:
      """:return: Value of the parameter."""
      return self._value
  
imports: import inspect
  import numbers
  import typing
  import hyperopt.pyll
  from matchzoo.engine import hyper_spaces
label_desc: Use image node_id 3 for calling the Param obj's underlying member method code with example usage: obj.value() and returns: self