code: def fix_wishart(d):
      df = d["df"]
      scale = d.get("scale", d.get("scale_tril"))
      return dict(
          d, df=tf.maximum(df, tf.cast(scale.shape[-1], df.dtype))
      )
  
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 9 for calling a global function with example usage: fix_wishart(d) and returns: dict