code: def _maybe_rectify_parameter_shapes(d):
      if hasattr(
          d, "_broadcast_parameters_with_batch_shape"
      ) and hasattr(d, "batch_shape_tensor"):
          # d is Distribution-like (or PSDKernel, etc.).
          d = d._broadcast_parameters_with_batch_shape(  # pylint: disable=protected-access
              ps.ones_like(d.batch_shape_tensor())
          )
      return d
  
file_path: probability/tensorflow_probability/python/internal/vectorization_util.py
imports: import functools
  import warnings
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.util import SeedStream
  from tensorflow.python.ops.parallel_for import control_flow_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling a global function with example usage: _maybe_rectify_parameter_shapes(d) and returns: d