def METHOD_NAME(self, value):
    """
    Returns the log of the probability mass function evaluated at ``value``.
    Note that this currently only supports scoring values with empty
    ``sample_shape``.
    :param torch.Tensor value: scalar or tensor value to be scored.
    """
    if self._validate_args:
        if value.shape != self.batch_shape + self.event_shape:
            raise ValueError(
                "``value.shape`` must be {}".format(
                    self.batch_shape + self.event_shape
                )
            )
    if self.batch_shape:
        value = value.unsqueeze(self._aggregation_dim)
    selection_mask = self._samples.eq(value)
    # Get a mask for all entries in the ``weights`` tensor
    # that correspond to ``value``.
    for _ in range(len(self.event_shape)):
        selection_mask = selection_mask.min(dim=-1)[0]
    selection_mask = selection_mask.type(self._categorical.probs.type())
    return (self._categorical.probs * selection_mask).sum(dim=-1).log()