code: def _prefer_static_shape(tensor):
      """Returns the static shape if fully specified else the dynamic shape."""
      tensor = tf.convert_to_tensor(tensor)
      static_shape = tensor.shape
      if static_shape.is_fully_defined():
          return static_shape
      return tf.shape(tensor)
  
file_path: tf-quant-finance/tf_quant_finance/models/legacy/brownian_motion.py
imports: import tensorflow.compat.v2
  from tf_quant_finance.math.random_ops import multivariate_normal
  from tf_quant_finance.models.legacy import brownian_motion_utils
  from tf_quant_finance.models.legacy import ito_process
label_desc: Use image node_id 1 for calling a global function with example usage: _prefer_static_shape(tensor) and returns: tf, static_shape