code: def _preserves_vector_dim(dim):
      return lambda bijector: bijector.forward_event_shape([dim]) == [
          dim
      ]
  
file_path: probability/tensorflow_probability/python/bijectors/transform_diagonal_test.py
imports: from absl import logging
  import hypothesis
  import hypothesis.strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import hypothesis_testlib
  from tensorflow_probability.python.bijectors import normal_cdf
  from tensorflow_probability.python.bijectors import transform_diagonal
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: _preserves_vector_dim(dim) and returns: function