code: def extra_tensor_conversions_allowed(dist):
      """Returns number of extra tensor conversions allowed for the input dist."""
      extra_conversions = EXTRA_TENSOR_CONVERSION_DISTS.get(
          type(dist).__name__
      )
      if extra_conversions:
          return extra_conversions
      if isinstance(dist, tfd.TransformedDistribution):
          return 1
      if isinstance(dist, tfd.BatchReshape):
          # One for the batch_shape_tensor needed by _call_reshape_input_output.
          # One to cover inability to turn off validate_args for the base
          # distribution (b/143297494).
          return 2
      return 0
  
imports: import collections
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python import distributions
  from tensorflow_probability.python.distributions import hypothesis_testlib
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: extra_tensor_conversions_allowed(dist) and returns: int, extra_conversions, int, int