code: def _instantiable_base_dists():
      """Computes the table of mechanically instantiable base Distributions.
  
      A Distribution is mechanically instantiable if
  
      - The class appears as a symbol binding in `tfp.distributions`;
      - The class defines a `_params_event_ndims` method (necessary
        to generate parameter Tensors with predictable batch shapes); and
      - The name is not blocklisted in `SPECIAL_DISTS`.
  
      Additionally, the Empricial distribution is hardcoded with special
      instantiation rules for each choice of event_ndims among 0, 1, and 2.
  
      Compound distributions like TransformedDistribution have their own
      instantiation rules hard-coded in the `distributions` strategy.
  
      Returns:
        instantiable_base_dists: A Python dict mapping distribution name
          (as a string) to a `DistInfo` carrying the information necessary to
          instantiate it.
      """
      result = {}
      for dist_name in dir(tfd):
          dist_class = getattr(tfd, dist_name)
          if (
              not inspect.isclass(dist_class)
              or not issubclass(dist_class, tfd.Distribution)
              or dist_name in SPECIAL_DISTS
          ):
              continue
          try:
              params_event_ndims = {
                  k: p.event_ndims
                  for (
                      k,
                      p,
                  ) in dist_class.parameter_properties().items()
                  if p.is_tensor and p.event_ndims is not None
              }
              has_concrete_event_ndims = all(
                  isinstance(nd, int)
                  for nd in params_event_ndims.values()
              )
          except NotImplementedError:
              has_concrete_event_ndims = False
          if has_concrete_event_ndims:
              result[dist_name] = DistInfo(
                  dist_class, params_event_ndims
              )
          else:
              logging.warning(
                  "Unable to test tfd.%s: `parameter_properties()` is not "
                  "implemented or does not define concrete (integer) `event_ndims` "
                  "for all parameters.",
                  dist_name,
              )
  
      # Empirical._params_event_ndims depends on `self.event_ndims`, so we have to
      # explicitly list these entries.
      result["Empirical|event_ndims=0"] = DistInfo(  #
          functools.partial(tfd.Empirical, event_ndims=0),
          dict(samples=1),
      )
      result["Empirical|event_ndims=1"] = DistInfo(  #
          functools.partial(tfd.Empirical, event_ndims=1),
          dict(samples=2),
      )
      result["Empirical|event_ndims=2"] = DistInfo(  #
          functools.partial(tfd.Empirical, event_ndims=2),
          dict(samples=3),
      )
  
      # We use a special strategy for instantiating this, so event_dims is set to a
      # dummy value.
      result["IncrementLogProb"] = DistInfo(tfed.IncrementLogProb, None)
      return result
  
imports: import collections
  import functools
  import inspect
  from absl import logging
  import hypothesis
  from hypothesis import strategies
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python import distributions
  from tensorflow_probability.python import util
  from tensorflow_probability.python.bijectors import ascending
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.experimental import distributions
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 12 for calling a global function with example usage: _instantiable_base_dists() and returns: result