class_docstr: EXPERIMENTAL :class:`~pyro.distributions.BetaBinomial` distribution
  extended to have logical support the entire integers and to allow arbitrary
  integer ``total_count``. Numerical support is still the integer interval
  ``[0, total_count]``.
code: def log_prob(self, value):
      if self._validate_args:
          self._validate_sample(value)
  
      total_count = self.total_count
      invalid = (value < 0) | (value > total_count)
      n = total_count.clamp(min=0)
      k = value.masked_fill(invalid, 0)
  
      try:
          self.total_count = n
          result = super().log_prob(k)
      finally:
          self.total_count = total_count
  
      return result.masked_fill(invalid, -math.inf)
  
file_path: pyro/pyro/distributions/extended.py
imports: import math
  from pyro.distributions import constraints
  from .conjugate import BetaBinomial
  from .torch import Binomial
label_desc: Use image node_id 1 for calling the ExtendedBetaBinomial obj's underlying member method code with example usage: obj.log_prob(value) and returns: result