code: def fix_finite_discrete(d):
      size = d.get("probs", d.get("logits", None)).shape[-1]
      return dict(d, outcomes=tf.linspace(-1.0, 1.0, size))
  
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 2 for calling a global function with example usage: fix_finite_discrete(d) and returns: dict