@hps.composite<EOL>def broadcasting_shapes(draw, batch_shape, param_names):
n = len(param_names)<EOL>return dict(zip(draw(hps.permutations(param_names)),<EOL>draw(tfp_test_util.broadcasting_shapes(batch_shape, n))))<EOL>
Draws a set of parameter batch shapes that broadcast to `batch_shape`.

    For each parameter we need to choose its batch rank, and whether or not each
    axis i is 1 or batch_shape[i]. This function chooses a set of shapes that
    have possibly mismatched ranks, and possibly broadcasting axes, with the
    promise that the broadcast of the set of all shapes matches `batch_shape`.

    Args:
      draw: Hypothesis sampler.
      batch_shape: `tf.TensorShape`, the target (fully-defined) batch shape .
      param_names: Iterable of `str`, the parameters whose batch shapes need
        determination.

    Returns:
      param_batch_shapes: `dict` of `str->tf.TensorShape` where the set of
          shapes broadcast to `batch_shape`. The shapes are fully defined.