def _value(self, dtype=None, name=None, as_ref=False):  # pylint: disable=g-doc-args
  """

  """
  # pylint: disable=protected-access
  if as_ref:
    raise NotImplementedError(
        'Cannot convert a `Distribution` to a reference '
        '(e.g., `tf.Variable`).')
  if self._concrete_value is None:
    if self._convert_to_tensor_fn is None:
      raise NotImplementedError(
          'Failed to convert object of type {} to Tensor. Contents: {}. '
          'Call `distribution.set_tensor_conversion(lambda self: ...)` to '
          'enable `tf.convert_to_tensor` capability. For example: '
          '`x = tfd.Normal(0,1).set_tensor_conversion(tfd.Distribution.mean)`'
          ' results in `tf.convert_to_tensor(x)` being identical to '
          '`x.mean()`.'.format(type(self), self))
    with self._name_scope('value'):
      self._concrete_value = (self._convert_to_tensor_fn(self)
                              if callable(self._convert_to_tensor_fn)
                              else self._convert_to_tensor_fn)
      if not tf.is_tensor(self._concrete_value):
        self._concrete_value = tfd._convert_to_tensor(
            value=self._concrete_value,
            name=name or 'concrete_value',
            dtype=dtype,
            dtype_hint=self.dtype)
  return self._concrete_value